linux-mips
[Top] [All Lists]

MIPS: alchemy: add return value check for strict_strtoul()

To: Ralf Baechle <ralf@linux-mips.org>
Subject: MIPS: alchemy: add return value check for strict_strtoul()
From: Yoichi Yuasa <yuasa@linux-mips.org>
Date: Mon, 8 Nov 2010 17:23:52 +0900
Cc: yuasa@linux-mips.org, linux-mips <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=fjR3ry0Pz6SfGtIR2+Ym1jkbtoCQl0WtKI0R95cWhCk=; b=a+L4an5C3DSIXKEgckvmCxZYOQ6DdTfV2OSpzUNCA+Nujf09XCcWx8oNwH9gRtR1ly 9wT9RED1mSKpijG74Iv+9Bm32tiNiVqbZedweK193VaMwDAxeYJ6gZNjPs3eKVCbeIaJ N4izTtYGYkzTtRk1w3ea4MDSuDnExm6ZWYZ1w=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=CMKzQxhvDpF89IqUKq1q96HBYmQcJApcO3hBM8KjeRtrzc1Y8K6i5Qe1dPECBNH3yH jyZQJSPHOyuTtbWRtDDr9KuYUvRTkUnWpkYzGrpEbwN9tNnW4vCsPXODJ9+lyGF9+ki1 YmjA+FRN4sfySBaU80R8+lI6BQzywGaji5jVw=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
arch/mips/alchemy/devboards/prom.c: In function 'prom_init':
arch/mips/alchemy/devboards/prom.c:60: error: ignoring return value of
'strict_strtoul', declared with attribute warn_unused_result

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
---
 arch/mips/alchemy/devboards/prom.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/alchemy/devboards/prom.c 
b/arch/mips/alchemy/devboards/prom.c
index b30df5c..baeb213 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);
 }
 
-- 
1.7.3.2


<Prev in Thread] Current Thread [Next in Thread>