mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe()
@ 2017-08-10 16:23 SF Markus Elfring
  2017-08-14 16:42 ` Applied "ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe()" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2017-08-10 16:23 UTC (permalink / raw)
  To: alsa-devel, Geert Uytterhoeven, Gustavo A. R. Silva,
	Jaroslav Kysela, Liam Girdwood, Mark Brown, Takashi Iwai
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 10 Aug 2017 18:18:20 +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/sh/fsi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 005b21506556..1f41cf1ff830 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1962,10 +1962,8 @@ static int fsi_probe(struct platform_device *pdev)
 	}
 
 	master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL);
-	if (!master) {
-		dev_err(&pdev->dev, "Could not allocate master\n");
+	if (!master)
 		return -ENOMEM;
-	}
 
 	master->base = devm_ioremap_nocache(&pdev->dev,
 					    res->start, resource_size(res));
-- 
2.14.0

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

end of thread, other threads:[~2017-08-14 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10 16:23 [PATCH] ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe() SF Markus Elfring
2017-08-14 16:42 ` Applied "ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe()" to the asoc tree Mark Brown

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

all inboxes | Powered by JetHome®