Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Broadwell RT5677: Delete an error message for a failed memory allocation in bdw_rt5677_probe()
@ 2017-08-11 11:23 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2017-08-11 11:23 UTC (permalink / raw)
  To: alsa-devel, Andy Shevchenko, Ben Zhang, Dylan Reid,
	Jaroslav Kysela, John Keeping, Julia Lawall, Liam Girdwood,
	Mark Brown, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 11 Aug 2017 13:05:40 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/intel/boards/bdw-rt5677.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c
index 058b8ccedf02..4b1431c3b460 100644
--- a/sound/soc/intel/boards/bdw-rt5677.c
+++ b/sound/soc/intel/boards/bdw-rt5677.c
@@ -349,7 +349,5 @@ static int bdw_rt5677_probe(struct platform_device *pdev)
-	if (!bdw_rt5677) {
-		dev_err(&pdev->dev, "Can't allocate bdw_rt5677\n");
+	if (!bdw_rt5677)
 		return -ENOMEM;
-	}
 
 	snd_soc_card_set_drvdata(&bdw_rt5677_card, bdw_rt5677);
 
-- 
2.14.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-11 11:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-11 11:23 [PATCH] ASoC: Broadwell RT5677: Delete an error message for a failed memory allocation in bdw_rt5677_probe() SF Markus Elfring

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