[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f32b2cf-dcde-ccef-24a5-f7b6ad9beb83@users.sourceforge.net>
Date: Fri, 11 Aug 2017 09:45:15 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: alsa-devel@...a-project.org,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>,
Jaroslav Kysela <perex@...ex.cz>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Takashi Iwai <tiwai@...e.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH] ASoC: kirkwood: Delete an error message for a failed memory
allocation in kirkwood_i2s_dev_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 11 Aug 2017 09:35:33 +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@...rs.sourceforge.net>
---
sound/soc/kirkwood/kirkwood-i2s.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 3b09f71b9535..105a73cc5158 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -538,10 +538,9 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
int err;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
- if (!priv) {
- dev_err(&pdev->dev, "allocation failed\n");
+ if (!priv)
return -ENOMEM;
- }
+
dev_set_drvdata(&pdev->dev, priv);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
2.14.0
Powered by blists - more mailing lists