[PATCH 3/3] MIPS: lantiq: Check return value from strict_strtoul().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Cc: John Crispin <blogic@xxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux