aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-iop.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-03-18 05:58:33 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-03-26 05:31:34 -0400
commit138d876e30353da34495e463d20c9bd7c0fd4ba0 (patch)
treeda3b60aef7e3a613a641751f52be3948aef29a3d /drivers/gpio/gpio-iop.c
parent523dcce72c72e829b9d391f8020277038c6aab82 (diff)
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@wantstofly.org> 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: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-iop.c')
-rw-r--r--drivers/gpio/gpio-iop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-iop.c b/drivers/gpio/gpio-iop.c
index c22a61be3a9c..0a5e9d3f308c 100644
--- a/drivers/gpio/gpio-iop.c
+++ b/drivers/gpio/gpio-iop.c
@@ -111,6 +111,8 @@ static int iop3xx_gpio_probe(struct platform_device *pdev)
111 111
112 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 112 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
113 base = devm_ioremap_resource(&pdev->dev, res); 113 base = devm_ioremap_resource(&pdev->dev, res);
114 if (IS_ERR(base))
115 return PTR_ERR(base);
114 116
115 return gpiochip_add(&iop3xx_chip); 117 return gpiochip_add(&iop3xx_chip);
116} 118}