[PATCH 03/10] resource: Let dev_get_mem_region_by_name return an error pointer

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 12 03:13:43 PDT 2014


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/base/driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 00b3046..e39a351 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;
 }
-- 
2.1.0




More information about the barebox mailing list