ALSA: gus: Delete an error message for a failed memory allocation in snd_gf1_dma_transfer_block()
Subsystems (2)
PATCH 1/1 ALSA: gus: Delete an error message for a failed memory allocation in snd_gf1_dma_transfer_block()
From: Markus Elfring <[email protected]>
Date: Wed, 22 Nov 2017 17:43:25 +0100
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 <[email protected]>
--- sound/isa/gus/gus_dma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
sound/isa/gus/gus_dma.c +2 -3
@@ -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 ;
Signature · 1 line
2.15.0
Takashi Iwai
AppliedQuoted 9 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Wed, 22 Nov 2017 17:43:25 +0100Omit 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 <[email protected]>
Applied, thanks.
Takashi