aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kstrtox.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-04-22 04:19:26 -0400
committerIngo Molnar <mingo@elte.hu>2011-04-22 04:19:30 -0400
commiteff430de53be6f3328c3eebe93755f1ecf499e37 (patch)
treec8e5ae958fe3e6656b4e96c83bbda17e649321a2 /lib/kstrtox.c
parent9cbdb702092a2d82f909312f4ec3eeded77bb82e (diff)
parent91e8549bde9e5cc88c5a2e8c8114389279e240b5 (diff)
Merge branch 'linus' into perf/core
Merge reason: Pick up upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/kstrtox.c')
-rw-r--r--lib/kstrtox.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/kstrtox.c b/lib/kstrtox.c
index 05672e819f8c..a235f3cc471c 100644
--- a/lib/kstrtox.c
+++ b/lib/kstrtox.c
@@ -49,12 +49,9 @@ static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res)
49 val = *s - '0'; 49 val = *s - '0';
50 else if ('a' <= _tolower(*s) && _tolower(*s) <= 'f') 50 else if ('a' <= _tolower(*s) && _tolower(*s) <= 'f')
51 val = _tolower(*s) - 'a' + 10; 51 val = _tolower(*s) - 'a' + 10;
52 else if (*s == '\n') { 52 else if (*s == '\n' && *(s + 1) == '\0')
53 if (*(s + 1) == '\0') 53 break;
54 break; 54 else
55 else
56 return -EINVAL;
57 } else
58 return -EINVAL; 55 return -EINVAL;
59 56
60 if (val >= base) 57 if (val >= base)