summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-31 08:22:21 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-16 08:32:09 +0200
commita00e634ac63c1020e197af454090df76445c8ef5 (patch)
tree03778c3eb03b2262686ba9500d602f1fe829811e
parent92cc1b1f9e3363046583962859a3a8c054f4b94d (diff)
downloadbarebox-a00e634ac63c1020e197af454090df76445c8ef5.tar.gz
barebox-a00e634ac63c1020e197af454090df76445c8ef5.tar.xz
resource: Let dev_get_mem_region_by_name return an error pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/base/driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 00b3046be..e39a351ba 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -296,7 +296,7 @@ void *dev_get_mem_region_by_name(struct device_d *dev, const char *name)
res = dev_get_resource_by_name(dev, IORESOURCE_MEM, name);
if (IS_ERR(res))
- return NULL;
+ return ERR_CAST(res);
return (void __force *)res->start;
}