summaryrefslogtreecommitdiff
path: root/sound/core/seq/seq_memory.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-10 15:41:18 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-10 15:41:18 +0100
commit24db8bbaa3fcfaf0c2faccbff5864b58088ac1f6 (patch)
treeab1e97ade094b0f661bf9aedc0c3aafb7cfab0cf /sound/core/seq/seq_memory.c
parent8d98a0673f761f9b7be51a293ca9142ec0c037ca (diff)
ALSA: seq: 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/seq_memory.c')
-rw-r--r--sound/core/seq/seq_memory.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
index ba8e4a64e13e..801076687bb1 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -387,10 +387,8 @@ int snd_seq_pool_init(struct snd_seq_pool *pool)
return 0;
pool->ptr = vmalloc(sizeof(struct snd_seq_event_cell) * pool->size);
- if (pool->ptr == NULL) {
- pr_debug("ALSA: seq: malloc for sequencer events failed\n");
+ if (!pool->ptr)
return -ENOMEM;
- }
/* add new cells to the free cell list */
spin_lock_irqsave(&pool->lock, flags);
@@ -463,10 +461,8 @@ struct snd_seq_pool *snd_seq_pool_new(int poolsize)
/* create pool block */
pool = kzalloc(sizeof(*pool), GFP_KERNEL);
- if (pool == NULL) {
- pr_debug("ALSA: seq: malloc failed for pool\n");
+ if (!pool)
return NULL;
- }
spin_lock_init(&pool->lock);
pool->ptr = NULL;
pool->free = NULL;