Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1678968 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-06-30 18:20 +0200 |
| Last post | 2017-06-30 18:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] pinctrl: rza1: fix error handling Arnd Bergmann <arnd@arndb.de> - 2017-06-30 18:20 +0200
Re: [PATCH] pinctrl: rza1: fix error handling jmondi <jacopo@jmondi.org> - 2017-06-30 18:50 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-06-30 18:20 +0200 |
| Subject | [PATCH] pinctrl: rza1: fix error handling |
| Message-ID | <tY6Of-7ID-31@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | jmondi <jacopo@jmondi.org> |
|---|---|
| Date | 2017-06-30 18:50 +0200 |
| Message-ID | <tY7hf-7Sv-5@gated-at.bofh.it> |
| In reply to | #1678968 |
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
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web