summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-11-22 17:43:25 +0100
committerTakashi Iwai <tiwai@suse.de>2017-11-29 09:29:36 +0100
commit4d0272ca40dfe524ce8d1ae350f0a246ef849d4b (patch)
tree6884f096870fdcaa8cae6fd6ba7e8d139f15ac41 /sound
parentcdc4398b399cad38e36be64faf3752aa12a44022 (diff)
ALSA: gus: Delete an error message for a failed memory allocation in snd_gf1_dma_transfer_block()
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/isa/gus/gus_dma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/isa/gus/gus_dma.c b/sound/isa/gus/gus_dma.c
index 36c27c832360..7f95f452f106 100644
--- a/sound/isa/gus/gus_dma.c
+++ b/sound/isa/gus/gus_dma.c
@@ -201,10 +201,9 @@ int snd_gf1_dma_transfer_block(struct snd_gus_card * gus,
struct snd_gf1_dma_block *block;
block = kmalloc(sizeof(*block), atomic ? GFP_ATOMIC : GFP_KERNEL);
- if (block == NULL) {
- snd_printk(KERN_ERR "gf1: DMA transfer failure; not enough memory\n");
+ if (!block)
return -ENOMEM;
- }
+
*block = *__block;
block->next = NULL;