summaryrefslogtreecommitdiffstats
path: root/common/memory.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-31 08:38:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-16 08:32:09 +0200
commitdde56d42ad1763dd81a3de65b74d7387d12f6fa9 (patch)
tree888d48be1b4beaaa73195f1879a9369d84c5af88 /common/memory.c
parent82ed2054665a2c6caa7b7a69143583e051289812 (diff)
downloadbarebox-dde56d42ad1763dd81a3de65b74d7387d12f6fa9.tar.gz
resource: Let request_iomem_region return an error pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/memory.c')
-rw-r--r--common/memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/memory.c b/common/memory.c
index c564550..57c73ab 100644
--- a/common/memory.c
+++ b/common/memory.c
@@ -124,8 +124,8 @@ int barebox_add_memory_bank(const char *name, resource_size_t start,
struct device_d *dev;
bank->res = request_iomem_region(name, start, start + size - 1);
- if (!bank->res)
- return -EBUSY;
+ if (IS_ERR(bank->res))
+ return PTR_ERR(bank->res);
dev = add_mem_device(name, start, size, IORESOURCE_MEM_WRITEABLE);