[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1625450.oZua1OVhNs@amdc1032>
Date: Tue, 18 Mar 2014 10:58:33 +0100
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To: Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>
Cc: Lennert Buytenhek <kernel@...tstofly.org>,
Dan Williams <dan.j.williams@...el.com>,
Mikael Pettersson <mikpe@...uu.se>,
Aaro Koskinen <aaro.koskinen@....fi>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] gpio: iop: fix devm_ioremap_resource() return value checking
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@...tstofly.org>
Cc: Dan Williams <dan.j.williams@...el.com>
Cc: Mikael Pettersson <mikpe@...uu.se>
Cc: Aaro Koskinen <aaro.koskinen@....fi>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists