X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fkstrtox.c;h=94be244e844103d0fb6ed20c7bee905ca908fa12;hb=5b6386419c4f78526afe1615668b6444d7b66fd7;hp=ec8da78df9be9f4ea245ff398193bd1d90210573;hpb=e8e6e6012d68c4967e8f26fdd39ac95c247d4789;p=deliverable%2Flinux.git diff --git a/lib/kstrtox.c b/lib/kstrtox.c index ec8da78df9be..94be244e8441 100644 --- a/lib/kstrtox.c +++ b/lib/kstrtox.c @@ -152,7 +152,7 @@ int kstrtoll(const char *s, unsigned int base, long long *res) rv = _kstrtoull(s + 1, base, &tmp); if (rv < 0) return rv; - if ((long long)(-tmp) >= 0) + if ((long long)-tmp > 0) return -ERANGE; *res = -tmp; } else {