Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709448

[PATCH] ASoC: Baytrail SST MAX98090: Delete an error message for a failed memory allocation in byt_max98090_probe()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH] ASoC: Baytrail SST MAX98090: Delete an error message for a failed memory allocation in byt_max98090_probe()
Date 2017-08-11 12:50 +0200
Message-ID <udfFT-2pX-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 11 Aug 2017 12:42: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/byt-max98090.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/byt-max98090.c b/sound/soc/intel/boards/byt-max98090.c
index 047be7fa0ce9..fa68bb32adef 100644
--- a/sound/soc/intel/boards/byt-max98090.c
+++ b/sound/soc/intel/boards/byt-max98090.c
@@ -152,10 +152,8 @@ static int byt_max98090_probe(struct platform_device *pdev)
 	int ret_val;
 
 	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_ATOMIC);
-	if (!priv) {
-		dev_err(&pdev->dev, "allocation failed\n");
+	if (!priv)
 		return -ENOMEM;
-	}
 
 	ret_val = devm_acpi_dev_add_driver_gpios(dev->parent, acpi_byt_max98090_gpios);
 	if (ret_val)
-- 
2.14.0

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] ASoC: Baytrail SST MAX98090: Delete an error message for a  failed memory allocation in byt_max98090_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-11 12:50 +0200

csiph-web