* [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking
@ 2014-03-18 9:58 Bartlomiej Zolnierkiewicz
2014-03-19 1:57 ` Alexandre Courbot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2014-03-18 9:58 UTC (permalink / raw)
To: Linus Walleij, Alexandre Courbot
Cc: Lennert Buytenhek, Dan Williams, Mikael Pettersson, Aaro Koskinen,
linux-gpio, linux-kernel
devm_ioremap_resource() returns a pointer to the remapped memory or
an ERR_PTR() encoded error code on failure. Fix the check inside
iop3xx_gpio_probe() accordingly.
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
Compile tested only.
drivers/gpio/gpio-iop.c | 2 ++
1 file changed, 2 insertions(+)
Index: b/drivers/gpio/gpio-iop.c
===================================================================
--- a/drivers/gpio/gpio-iop.c 2014-03-14 16:45:08.152724313 +0100
+++ b/drivers/gpio/gpio-iop.c 2014-03-18 10:50:01.903194680 +0100
@@ -111,6 +111,8 @@ static int iop3xx_gpio_probe(struct plat
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
return gpiochip_add(&iop3xx_chip);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking
2014-03-18 9:58 [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking Bartlomiej Zolnierkiewicz
@ 2014-03-19 1:57 ` Alexandre Courbot
2014-03-19 16:58 ` Dan Williams
2014-03-25 14:04 ` Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Alexandre Courbot @ 2014-03-19 1:57 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Linus Walleij, Lennert Buytenhek, Dan Williams, Mikael Pettersson,
Aaro Koskinen, linux-gpio@vger.kernel.org,
Linux Kernel Mailing List
On Tue, Mar 18, 2014 at 6:58 PM, Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
> devm_ioremap_resource() returns a pointer to the remapped memory or
> an ERR_PTR() encoded error code on failure. Fix the check inside
> iop3xx_gpio_probe() accordingly.
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking
2014-03-18 9:58 [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking Bartlomiej Zolnierkiewicz
2014-03-19 1:57 ` Alexandre Courbot
@ 2014-03-19 16:58 ` Dan Williams
2014-03-25 14:04 ` Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Dan Williams @ 2014-03-19 16:58 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Linus Walleij, Alexandre Courbot, Lennert Buytenhek,
Mikael Pettersson, Aaro Koskinen, linux-gpio,
linux-kernel@vger.kernel.org
On Tue, Mar 18, 2014 at 2:58 AM, Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
> devm_ioremap_resource() returns a pointer to the remapped memory or
> an ERR_PTR() encoded error code on failure. Fix the check inside
> iop3xx_gpio_probe() accordingly.
>
> Cc: Lennert Buytenhek <kernel@wantstofly.org>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Mikael Pettersson <mikpe@it.uu.se>
> Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking
2014-03-18 9:58 [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking Bartlomiej Zolnierkiewicz
2014-03-19 1:57 ` Alexandre Courbot
2014-03-19 16:58 ` Dan Williams
@ 2014-03-25 14:04 ` Linus Walleij
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2014-03-25 14:04 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Alexandre Courbot, Lennert Buytenhek, Dan Williams,
Mikael Pettersson, Aaro Koskinen, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
On Tue, Mar 18, 2014 at 10:58 AM, Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
> devm_ioremap_resource() returns a pointer to the remapped memory or
> an ERR_PTR() encoded error code on failure. Fix the check inside
> iop3xx_gpio_probe() accordingly.
>
> Cc: Lennert Buytenhek <kernel@wantstofly.org>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Mikael Pettersson <mikpe@it.uu.se>
> Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Patch applied with ACKs.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-25 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 9:58 [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking Bartlomiej Zolnierkiewicz
2014-03-19 1:57 ` Alexandre Courbot
2014-03-19 16:58 ` Dan Williams
2014-03-25 14:04 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox