summaryrefslogtreecommitdiffstats
path: root/sound/core/seq/oss/seq_oss_synth.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-10 15:39:55 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-10 15:39:55 +0100
commit8d98a0673f761f9b7be51a293ca9142ec0c037ca (patch)
treed30312d069a59ef750de013c6d8010b77573047c /sound/core/seq/oss/seq_oss_synth.c
parent2225e79b9b0370bc179f44756bee809b5e7b4d06 (diff)
downloadlinux-8d98a0673f761f9b7be51a293ca9142ec0c037ca.tar.bz2
ALSA: seq_oss: Drop superfluous error/debug messages after malloc failures
The kernel memory allocators already report the errors when the requested allocation fails, thus we don't need to warn it again in each caller side. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq/oss/seq_oss_synth.c')
-rw-r--r--sound/core/seq/oss/seq_oss_synth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 835edc80f918..48e4fe1b68ab 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -106,10 +106,9 @@ snd_seq_oss_synth_probe(struct device *_dev)
struct snd_seq_oss_reg *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
unsigned long flags;
- if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) {
- pr_err("ALSA: seq_oss: can't malloc synth info\n");
+ rec = kzalloc(sizeof(*rec), GFP_KERNEL);
+ if (!rec)
return -ENOMEM;
- }
rec->seq_device = -1;
rec->synth_type = reg->type;
rec->synth_subtype = reg->subtype;
@@ -249,7 +248,6 @@ snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
if (info->nr_voices > 0) {
info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL);
if (!info->ch) {
- pr_err("ALSA: seq_oss: Cannot malloc voices\n");
rec->oper.close(&info->arg);
module_put(rec->oper.owner);
snd_use_lock_free(&rec->use_lock);