summaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/prom.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/alchemy/devboards/prom.c')
-rw-r--r--arch/mips/alchemy/devboards/prom.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/mips/alchemy/devboards/prom.c b/arch/mips/alchemy/devboards/prom.c
index b30df5c97ad3..baeb21385058 100644
--- a/arch/mips/alchemy/devboards/prom.c
+++ b/arch/mips/alchemy/devboards/prom.c
@@ -54,10 +54,9 @@ void __init prom_init(void)
prom_init_cmdline();
memsize_str = prom_getenv("memsize");
- if (!memsize_str)
+ if (!memsize_str || strict_strtoul(memsize_str, 0, &memsize))
memsize = ALCHEMY_BOARD_DEFAULT_MEMSIZE;
- else
- strict_strtoul(memsize_str, 0, &memsize);
+
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
OpenPOWER on IntegriCloud