diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-04-27 08:44:34 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-04-27 08:44:34 +0100 |
commit | 167f829752f9cef51f59cc500abc0ad6ba69f5cb (patch) | |
tree | d3ec172cdd864c748bea2c014943fc13873fefc0 /lib/kstrtox.c | |
parent | e04d6c53a58cee3380adaa66fe2eeffbd82d213c (diff) | |
parent | 45b146d746ea1b7f87b023a79d5186d0e87793eb (diff) | |
download | kernel_samsung_smdk4412-167f829752f9cef51f59cc500abc0ad6ba69f5cb.tar.gz kernel_samsung_smdk4412-167f829752f9cef51f59cc500abc0ad6ba69f5cb.tar.bz2 kernel_samsung_smdk4412-167f829752f9cef51f59cc500abc0ad6ba69f5cb.zip |
Merge branch 'davinci-fixes' of git://gitorious.org/linux-davinci/linux-davinci into fixes
Diffstat (limited to 'lib/kstrtox.c')
-rw-r--r-- | lib/kstrtox.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/kstrtox.c b/lib/kstrtox.c index 05672e819f8..a235f3cc471 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) val = *s - '0'; else if ('a' <= _tolower(*s) && _tolower(*s) <= 'f') val = _tolower(*s) - 'a' + 10; - else if (*s == '\n') { - if (*(s + 1) == '\0') - break; - else - return -EINVAL; - } else + else if (*s == '\n' && *(s + 1) == '\0') + break; + else return -EINVAL; if (val >= base) |