summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-10-08 00:33:15 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-08 00:33:21 +0200
commitb36cc0f88452a1c4fba64559b15bbb87c6bd4f8a (patch)
tree0ef763a265c85ad55453a828ba46f0c52c4783e2 /include
parentbad4d7cd754579cfe20cba4c721b2c1269bfa2d8 (diff)
downloadbarebox-b36cc0f88452a1c4fba64559b15bbb87c6bd4f8a.tar.gz
barebox-b36cc0f88452a1c4fba64559b15bbb87c6bd4f8a.tar.xz
memory: return error in barebox_add_memory_bank
When a memory bank is already registered, return an error code instead of throwing a bug. This can happen if a board has registered a memory bank and the same bank is then probed from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/memory.h b/include/memory.h
index 4be4340b14..165d2dc52a 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -18,7 +18,7 @@ struct memory_bank {
extern struct list_head memory_banks;
-void barebox_add_memory_bank(const char *name, resource_size_t start,
+int barebox_add_memory_bank(const char *name, resource_size_t start,
resource_size_t size);
#define for_each_memory_bank(mem) list_for_each_entry(mem, &memory_banks, list)