* [PATCH] pinctrl: rza1: fix error handling
@ 2017-06-30 16:09 Arnd Bergmann
2017-06-30 16:42 ` jmondi
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-06-30 16:09 UTC (permalink / raw)
To: Linus Walleij
Cc: Arnd Bergmann, Jacopo Mondi, Geert Uytterhoeven, linux-gpio,
linux-kernel
A compiler warning points out a typo:
drivers/pinctrl/pinctrl-rza1.c: In function 'rza1_pinctrl_probe':
drivers/pinctrl/pinctrl-rza1.c:1260:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This changes the condition to the usual check for failure of the previous
function call.
Fixes: 5a49b644b307 ("pinctrl: Renesas RZ/A1 pin and gpio controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pinctrl/pinctrl-rza1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
index 614a043f3038..1d57d4480a02 100644
--- a/drivers/pinctrl/pinctrl-rza1.c
+++ b/drivers/pinctrl/pinctrl-rza1.c
@@ -1257,7 +1257,7 @@ static int rza1_pinctrl_probe(struct platform_device *pdev)
rza1_pctl->dev = &pdev->dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (ret)
+ if (!res)
return -ENODEV;
rza1_pctl->base = devm_ioremap_resource(&pdev->dev, res);
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: rza1: fix error handling
2017-06-30 16:09 [PATCH] pinctrl: rza1: fix error handling Arnd Bergmann
@ 2017-06-30 16:42 ` jmondi
0 siblings, 0 replies; 2+ messages in thread
From: jmondi @ 2017-06-30 16:42 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Linus Walleij, Jacopo Mondi, Geert Uytterhoeven, linux-gpio,
linux-kernel
Hi Arnd,
On Fri, Jun 30, 2017 at 06:09:53PM +0200, Arnd Bergmann wrote:
> A compiler warning points out a typo:
>
Geert already sent a fix for this
https://patchwork.kernel.org/patch/9818555/
It should have been applied already
Thanks
j
> drivers/pinctrl/pinctrl-rza1.c: In function 'rza1_pinctrl_probe':
> drivers/pinctrl/pinctrl-rza1.c:1260:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> This changes the condition to the usual check for failure of the previous
> function call.
>
> Fixes: 5a49b644b307 ("pinctrl: Renesas RZ/A1 pin and gpio controller")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/pinctrl/pinctrl-rza1.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
> index 614a043f3038..1d57d4480a02 100644
> --- a/drivers/pinctrl/pinctrl-rza1.c
> +++ b/drivers/pinctrl/pinctrl-rza1.c
> @@ -1257,7 +1257,7 @@ static int rza1_pinctrl_probe(struct platform_device *pdev)
> rza1_pctl->dev = &pdev->dev;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (ret)
> + if (!res)
> return -ENODEV;
>
> rza1_pctl->base = devm_ioremap_resource(&pdev->dev, res);
> --
> 2.9.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-30 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 16:09 [PATCH] pinctrl: rza1: fix error handling Arnd Bergmann
2017-06-30 16:42 ` jmondi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.