summaryrefslogtreecommitdiff
path: root/sound/core/seq/oss/seq_oss_readq.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_readq.c
parent2225e79b9b0370bc179f44756bee809b5e7b4d06 (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_readq.c')
-rw-r--r--sound/core/seq/oss/seq_oss_readq.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c
index 654d17a5023c..c080c73cea04 100644
--- a/sound/core/seq/oss/seq_oss_readq.c
+++ b/sound/core/seq/oss/seq_oss_readq.c
@@ -47,13 +47,12 @@ snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen)
{
struct seq_oss_readq *q;
- if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) {
- pr_err("ALSA: seq_oss: can't malloc read queue\n");
+ q = kzalloc(sizeof(*q), GFP_KERNEL);
+ if (!q)
return NULL;
- }
- if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) {
- pr_err("ALSA: seq_oss: can't malloc read queue buffer\n");
+ q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL);
+ if (!q->q) {
kfree(q);
return NULL;
}