Skip to content

Commit

Permalink
ALSA: gus: Delete an error message for a failed memory allocation in …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
elfring authored and tiwai committed Nov 29, 2017
1 parent cdc4398 commit 4d0272c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/isa/gus/gus_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4d0272c

Please sign in to comment.