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


Groups > linux.kernel > #1708814 > unrolled thread

[PATCH] ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-08-10 18:30 +0200
Last post2017-08-10 18:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ASoC: fsi: Delete an error message for a failed memory  allocation in fsi_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-10 18:30 +0200

#1708814 — [PATCH] ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-08-10 18:30 +0200
Subject[PATCH] ASoC: fsi: Delete an error message for a failed memory allocation in fsi_probe()
Message-ID<ucYvo-83r-23@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web