Commit 4f9d5f4a authored by Hoang-Nam Nguyen's avatar Hoang-Nam Nguyen Committed by Linus Torvalds

lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param)

lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param)
Signed-off-by: default avatarHoang-Nam Nguyen <hnguyen@de.ibm.com>
Cc: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8ca3ed87
......@@ -234,7 +234,7 @@ int strict_strto##type(const char *cp, unsigned int base, valtype *res) \
int ret; \
if (*cp == '-') { \
ret = strict_strtou##type(cp+1, base, res); \
if (ret != 0) \
if (!ret) \
*res = -(*res); \
} else \
ret = strict_strtou##type(cp, base, res); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment