summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-31 09:02:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-16 08:32:10 +0200
commit29b7f95f3bd244a4b4d036e1b3a94a7bfbe3581c (patch)
tree282c0036b7127af4ecb76e6fb214de8a2077bcfb /drivers/pinctrl
parent9d518ba397712add7fa06ff3ab056a26a3c46de6 (diff)
downloadbarebox-29b7f95f3bd244a4b4d036e1b3a94a7bfbe3581c.tar.gz
barebox-29b7f95f3bd244a4b4d036e1b3a94a7bfbe3581c.tar.xz
resource: Let dev_get_mem_region return an error pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/imx-iomux-v1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/imx-iomux-v1.c b/drivers/pinctrl/imx-iomux-v1.c
index 16415c2de0..a3f04802a2 100644
--- a/drivers/pinctrl/imx-iomux-v1.c
+++ b/drivers/pinctrl/imx-iomux-v1.c
@@ -4,6 +4,7 @@
#include <malloc.h>
#include <pinctrl.h>
#include <mach/iomux-v1.h>
+#include <linux/err.h>
/*
* GPIO Module and I/O Multiplexer
@@ -284,6 +285,8 @@ static int imx_iomux_v1_probe(struct device_d *dev)
return -EBUSY;
iomuxv1_base = dev_get_mem_region(dev, 0);
+ if (IS_ERR(iomuxv1_base))
+ return PTR_ERR(iomuxv1_base);
ret = of_platform_populate(dev->device_node, NULL, NULL);