linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: mvebu: Delete an error message for a failed memory allocation in mvebu_pinctrl_probe()
@ 2017-12-19 21:37 SF Markus Elfring
  2017-12-20 12:20 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2017-12-19 21:37 UTC (permalink / raw)
  To: linux-arm-kernel, linux-gpio, Andrew Lunn, Gregory Clement,
	Jason Cooper, Linus Walleij, Sebastian Hesselbarth
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 19 Dec 2017 22:30:36 +0100

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

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/pinctrl/mvebu/pinctrl-mvebu.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 163d4614b0f8..9e05cfaf75f0 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -636,10 +636,9 @@ int mvebu_pinctrl_probe(struct platform_device *pdev)
 	 */
 	size = pctl->num_groups * sizeof(*pctl->groups) + noname * 8;
 	p = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
-	if (!p) {
-		dev_err(&pdev->dev, "failed to alloc group data\n");
+	if (!p)
 		return -ENOMEM;
-	}
+
 	pctl->groups = p;
 	noname_buf = p + pctl->num_groups * sizeof(*pctl->groups);
 
-- 
2.15.1


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

* Re: [PATCH] pinctrl: mvebu: Delete an error message for a failed memory allocation in mvebu_pinctrl_probe()
  2017-12-19 21:37 [PATCH] pinctrl: mvebu: Delete an error message for a failed memory allocation in mvebu_pinctrl_probe() SF Markus Elfring
@ 2017-12-20 12:20 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2017-12-20 12:20 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: Linux ARM, linux-gpio, Andrew Lunn, Gregory Clement, Jason Cooper,
	Sebastian Hesselbarth, LKML, kernel-janitors

On Tue, Dec 19, 2017 at 10:37 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 19 Dec 2017 22:30:36 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2017-12-20 12:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-19 21:37 [PATCH] pinctrl: mvebu: Delete an error message for a failed memory allocation in mvebu_pinctrl_probe() SF Markus Elfring
2017-12-20 12:20 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).