| To: | linux-mips@linux-mips.org, ralf@linux-mips.org |
|---|---|
| Subject: | [PATCH 3/3] MIPS: lantiq: Check return value from strict_strtoul(). |
| From: | David Daney <ddaney@caviumnetworks.com> |
| Date: | Wed, 11 May 2011 13:22:27 -0700 |
| Cc: | David Daney <ddaney@caviumnetworks.com>, John Crispin <blogic@openwrt.org> |
| In-reply-to: | <1305145347-32605-1-git-send-email-ddaney@caviumnetworks.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <1305145347-32605-1-git-send-email-ddaney@caviumnetworks.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
The build fails if we don't check the return value from
strict_strtoul(), so print a message if it fails.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: John Crispin <blogic@openwrt.org>
---
arch/mips/lantiq/setup.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/mips/lantiq/setup.c b/arch/mips/lantiq/setup.c
index 2f27f58..9b8af77 100644
--- a/arch/mips/lantiq/setup.c
+++ b/arch/mips/lantiq/setup.c
@@ -35,7 +35,8 @@ void __init plat_mem_setup(void)
char *e = (char *)KSEG1ADDR(*envp);
if (!strncmp(e, "memsize=", 8)) {
e += 8;
- strict_strtoul(e, 0, &memsize);
+ if (strict_strtoul(e, 0, &memsize))
+ pr_warn("bad memsize specified\n");
}
envp++;
}
--
1.7.2.3
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 1/3] MIPS: lantiq: Add missing include to mach-easy50712.c, David Daney |
|---|---|
| Next by Date: | Re: [PATCH 1/3] MIPS: lantiq: Add missing include to mach-easy50712.c, Ralf Baechle |
| Previous by Thread: | Re: [PATCH 1/3] MIPS: lantiq: Add missing include to mach-easy50712.c, John Crispin |
| Next by Thread: | Re: [PATCH 3/3] MIPS: lantiq: Check return value from strict_strtoul()., Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |