diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-10 15:39:55 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-10 15:39:55 +0100 |
commit | 8d98a0673f761f9b7be51a293ca9142ec0c037ca (patch) | |
tree | d30312d069a59ef750de013c6d8010b77573047c /sound/core/seq/oss/seq_oss_midi.c | |
parent | 2225e79b9b0370bc179f44756bee809b5e7b4d06 (diff) |
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_midi.c')
-rw-r--r-- | sound/core/seq/oss/seq_oss_midi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c index e79cc44b1394..96e8395ae586 100644 --- a/sound/core/seq/oss/seq_oss_midi.c +++ b/sound/core/seq/oss/seq_oss_midi.c @@ -173,10 +173,9 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo) /* * allocate midi info record */ - if ((mdev = kzalloc(sizeof(*mdev), GFP_KERNEL)) == NULL) { - pr_err("ALSA: seq_oss: can't malloc midi info\n"); + mdev = kzalloc(sizeof(*mdev), GFP_KERNEL); + if (!mdev) return -ENOMEM; - } /* copy the port information */ mdev->client = pinfo->addr.client; |