linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: spear: Delete an error message for a failed memory allocation in spear_pinctrl_probe()
@ 2017-12-27 21:48 SF Markus Elfring
  2017-12-28  5:27 ` Viresh Kumar
  2018-01-02  8:59 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-12-27 21:48 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, Linus Walleij, Viresh Kumar
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Dec 2017 22:44:04 +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/spear/pinctrl-spear.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c
index 4db52ba38d8d..efe79d3f7659 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.c
+++ b/drivers/pinctrl/spear/pinctrl-spear.c
@@ -361,10 +361,8 @@ int spear_pinctrl_probe(struct platform_device *pdev,
 		return -ENODEV;
 
 	pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
-	if (!pmx) {
-		dev_err(&pdev->dev, "Can't alloc spear_pmx\n");
+	if (!pmx)
 		return -ENOMEM;
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	pmx->vbase = devm_ioremap_resource(&pdev->dev, res);
-- 
2.15.1


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

* Re: [PATCH] pinctrl: spear: Delete an error message for a failed memory allocation in spear_pinctrl_probe()
  2017-12-27 21:48 [PATCH] pinctrl: spear: Delete an error message for a failed memory allocation in spear_pinctrl_probe() SF Markus Elfring
@ 2017-12-28  5:27 ` Viresh Kumar
  2018-01-02  8:59 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2017-12-28  5:27 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-gpio, linux-arm-kernel, Linus Walleij, Viresh Kumar, LKML,
	kernel-janitors

On 27-12-17, 22:48, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2017 22:44:04 +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/spear/pinctrl-spear.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c
> index 4db52ba38d8d..efe79d3f7659 100644
> --- a/drivers/pinctrl/spear/pinctrl-spear.c
> +++ b/drivers/pinctrl/spear/pinctrl-spear.c
> @@ -361,10 +361,8 @@ int spear_pinctrl_probe(struct platform_device *pdev,
>  		return -ENODEV;
>  
>  	pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
> -	if (!pmx) {
> -		dev_err(&pdev->dev, "Can't alloc spear_pmx\n");
> +	if (!pmx)
>  		return -ENOMEM;
> -	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	pmx->vbase = devm_ioremap_resource(&pdev->dev, res);

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH] pinctrl: spear: Delete an error message for a failed memory allocation in spear_pinctrl_probe()
  2017-12-27 21:48 [PATCH] pinctrl: spear: Delete an error message for a failed memory allocation in spear_pinctrl_probe() SF Markus Elfring
  2017-12-28  5:27 ` Viresh Kumar
@ 2018-01-02  8:59 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2018-01-02  8:59 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-gpio, Linux ARM, Viresh Kumar, LKML, kernel-janitors

On Wed, Dec 27, 2017 at 10:48 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2017 22:44:04 +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 with Viresh's ACK.

Yours,
Linus Walleij

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

end of thread, other threads:[~2018-01-02  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-27 21:48 [PATCH] pinctrl: spear: Delete an error message for a failed memory allocation in spear_pinctrl_probe() SF Markus Elfring
2017-12-28  5:27 ` Viresh Kumar
2018-01-02  8:59 ` 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).