From: Yi Yang <yi.y.yang@intel.com>
Date: Tue, 12 Aug 2008 22:08:58 +0000 (-0700)
Subject: lib/vsprintf.c: wrong conversion function used
X-Git-Tag: firefly_0821_release~18318
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=29a6d39bf3a890ad1d29e66baa9f4bc8d9334f3a;p=firefly-linux-kernel-4.4.55.git

lib/vsprintf.c: wrong conversion function used

Fix wrong conversion function used by strict_strtou*

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Reported-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 1dc2d1d18fa8..d8d1d1142248 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -220,7 +220,7 @@ int strict_strtou##type(const char *cp, unsigned int base, valtype *res)\
 	if (len == 0)							\
 		return -EINVAL;						\
 									\
-	val = simple_strtoul(cp, &tail, base);				\
+	val = simple_strtou##type(cp, &tail, base);			\
 	if ((*tail == '\0') ||						\
 		((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\
 		*res = val;						\