mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: gus: Delete an error message for a failed memory allocation in snd_gf1_dma_transfer_block()
@ 2017-11-22 16:47 SF Markus Elfring
  2017-11-28  7:27 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2017-11-22 16:47 UTC (permalink / raw)
  To: alsa-devel, Jaroslav Kysela, Takashi Iwai; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
 sound/isa/gus/gus_dma.c | 5 ++---
 1 file 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;
 
-- 
2.15.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: gus: Delete an error message for a failed memory allocation in snd_gf1_dma_transfer_block()
  2017-11-22 16:47 [PATCH] ALSA: gus: Delete an error message for a failed memory allocation in snd_gf1_dma_transfer_block() SF Markus Elfring
@ 2017-11-28  7:27 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-11-28  7:27 UTC (permalink / raw)
  To: SF Markus Elfring; +Cc: alsa-devel, Jaroslav Kysela, kernel-janitors, LKML

On Wed, 22 Nov 2017 17:47:14 +0100,
SF Markus Elfring wrote:
> 
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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 <elfring@users.sourceforge.net>

Applied, thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-28  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 16:47 [PATCH] ALSA: gus: Delete an error message for a failed memory allocation in snd_gf1_dma_transfer_block() SF Markus Elfring
2017-11-28  7:27 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome