MIPS: Alchemy: fix xxs1500 build error
authorManuel Lauss <manuel.lauss@googlemail.com>
Sat, 7 May 2011 11:55:19 +0000 (13:55 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 10 May 2011 17:15:26 +0000 (18:15 +0100)
This fixes:
alchemy/xxs1500/init.c: In function 'prom_init':
alchemy/xxs1500/init.c:57:17: error: ignoring return value of 'kstrtoul', declared with attribute warn_unused_result

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/2340/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/alchemy/xxs1500/init.c

index 15125c2fda7d7397de3dcee2ec1f1555babc1f85..34a90a4bb6f4496a67906998ddb9ae8ffc3262f3 100644 (file)
@@ -51,10 +51,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 = 0x04000000;
-       else
-               strict_strtoul(memsize_str, 0, &memsize);
+
        add_memory_region(0, memsize, BOOT_MEM_RAM);
 }