Commit 4f9d5f4a353440f2265781bfa641587964901861

Authored by Hoang-Nam Nguyen
Committed by Linus Torvalds
1 parent 8ca3ed87db

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: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Cc: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -234,7 +234,7 @@
234 234 int ret; \
235 235 if (*cp == '-') { \
236 236 ret = strict_strtou##type(cp+1, base, res); \
237   - if (ret != 0) \
  237 + if (!ret) \
238 238 *res = -(*res); \
239 239 } else \
240 240 ret = strict_strtou##type(cp, base, res); \