* [PATCH -next] pinctrl: at91-pio4: remove redundant return value check of platform_get_resource()
@ 2018-07-11 12:34 Wei Yongjun
2018-07-11 13:03 ` Alexandre Belloni
2018-07-13 7:43 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2018-07-11 12:34 UTC (permalink / raw)
To: Ludovic Desroches, Linus Walleij, Nicolas Ferre,
Alexandre Belloni
Cc: linux-gpio, kernel-janitors, Wei Yongjun, linux-arm-kernel
Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/pinctrl/pinctrl-at91-pio4.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 8f06197..ef7ab20 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -971,10 +971,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
atmel_pioctrl->npins = atmel_pioctrl->nbanks * ATMEL_PIO_NPINS_PER_BANK;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "unable to get atmel pinctrl resource\n");
- return -EINVAL;
- }
atmel_pioctrl->reg_base = devm_ioremap_resource(dev, res);
if (IS_ERR(atmel_pioctrl->reg_base))
return -EINVAL;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] pinctrl: at91-pio4: remove redundant return value check of platform_get_resource()
2018-07-11 12:34 [PATCH -next] pinctrl: at91-pio4: remove redundant return value check of platform_get_resource() Wei Yongjun
@ 2018-07-11 13:03 ` Alexandre Belloni
2018-07-11 14:10 ` Ludovic Desroches
2018-07-13 7:43 ` Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Alexandre Belloni @ 2018-07-11 13:03 UTC (permalink / raw)
To: Wei Yongjun
Cc: Linus Walleij, kernel-janitors, linux-gpio, Ludovic Desroches,
linux-arm-kernel
On 11/07/2018 12:34:07+0000, Wei Yongjun wrote:
> Remove unneeded error handling on the result of a call
> to platform_get_resource() when the value is passed to
> devm_ioremap_resource().
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
I'm not sure it is worth the effort but
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> drivers/pinctrl/pinctrl-at91-pio4.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index 8f06197..ef7ab20 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -971,10 +971,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
> atmel_pioctrl->npins = atmel_pioctrl->nbanks * ATMEL_PIO_NPINS_PER_BANK;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res) {
> - dev_err(dev, "unable to get atmel pinctrl resource\n");
> - return -EINVAL;
> - }
> atmel_pioctrl->reg_base = devm_ioremap_resource(dev, res);
> if (IS_ERR(atmel_pioctrl->reg_base))
> return -EINVAL;
>
>
>
--
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] pinctrl: at91-pio4: remove redundant return value check of platform_get_resource()
2018-07-11 13:03 ` Alexandre Belloni
@ 2018-07-11 14:10 ` Ludovic Desroches
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Desroches @ 2018-07-11 14:10 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Linus Walleij, kernel-janitors, linux-gpio, Wei Yongjun,
linux-arm-kernel
On Wed, Jul 11, 2018 at 03:03:49PM +0200, Alexandre Belloni wrote:
> On 11/07/2018 12:34:07+0000, Wei Yongjun wrote:
> > Remove unneeded error handling on the result of a call
> > to platform_get_resource() when the value is passed to
> > devm_ioremap_resource().
> >
> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>
> I'm not sure it is worth the effort but
I have the same feeling. If it's the trend:
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
>
> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
>
> > ---
> > drivers/pinctrl/pinctrl-at91-pio4.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> > index 8f06197..ef7ab20 100644
> > --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> > +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> > @@ -971,10 +971,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
> > atmel_pioctrl->npins = atmel_pioctrl->nbanks * ATMEL_PIO_NPINS_PER_BANK;
> >
> > res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > - if (!res) {
> > - dev_err(dev, "unable to get atmel pinctrl resource\n");
> > - return -EINVAL;
> > - }
> > atmel_pioctrl->reg_base = devm_ioremap_resource(dev, res);
> > if (IS_ERR(atmel_pioctrl->reg_base))
> > return -EINVAL;
> >
> >
> >
>
> --
> Alexandre Belloni, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] pinctrl: at91-pio4: remove redundant return value check of platform_get_resource()
2018-07-11 12:34 [PATCH -next] pinctrl: at91-pio4: remove redundant return value check of platform_get_resource() Wei Yongjun
2018-07-11 13:03 ` Alexandre Belloni
@ 2018-07-13 7:43 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2018-07-13 7:43 UTC (permalink / raw)
To: Wei Yongjun
Cc: Alexandre Belloni, kernel-janitors, open list:GPIO SUBSYSTEM,
Ludovic Desroches, Linux ARM
On Wed, Jul 11, 2018 at 2:25 PM Wei Yongjun <weiyongjun1@huawei.com> wrote:
> Remove unneeded error handling on the result of a call
> to platform_get_resource() when the value is passed to
> devm_ioremap_resource().
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Patch applied with the ACKs.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-13 7:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-11 12:34 [PATCH -next] pinctrl: at91-pio4: remove redundant return value check of platform_get_resource() Wei Yongjun
2018-07-11 13:03 ` Alexandre Belloni
2018-07-11 14:10 ` Ludovic Desroches
2018-07-13 7:43 ` 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).