diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-31 08:33:33 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-09-16 08:32:09 +0200 |
commit | 82ed2054665a2c6caa7b7a69143583e051289812 (patch) | |
tree | c66f6c00c6bd7688e9554d94d84e0dd8a8445e3d /common/memory.c | |
parent | a00e634ac63c1020e197af454090df76445c8ef5 (diff) | |
download | barebox-82ed2054665a2c6caa7b7a69143583e051289812.tar.gz barebox-82ed2054665a2c6caa7b7a69143583e051289812.tar.xz |
resource: Let __request_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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/memory.c b/common/memory.c index 4a8fe283f2..c56455002a 100644 --- a/common/memory.c +++ b/common/memory.c @@ -22,6 +22,7 @@ #include <of.h> #include <init.h> #include <linux/ioport.h> +#include <linux/err.h> #include <asm-generic/memory_layout.h> #include <asm/sections.h> #include <malloc.h> @@ -150,7 +151,7 @@ struct resource *request_sdram_region(const char *name, resource_size_t start, res = __request_region(bank->res, name, start, start + size - 1); - if (res) + if (!IS_ERR(res)) return res; } |