diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-05 01:11:24 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-05 01:54:15 +0200 |
commit | 6c5a53c67057bddf7f8e26c93a8e045215f61539 (patch) | |
tree | 531badfdaccd5f80e3dedd21cc890c0525ec2433 /kernel | |
parent | kernel/tracepoint.c: kernel-doc fixes (diff) | |
download | linux-6c5a53c67057bddf7f8e26c93a8e045215f61539.tar.xz linux-6c5a53c67057bddf7f8e26c93a8e045215f61539.zip |
kernel/res_counter.c: replace simple_strtoull by kstrtoull
[akpm@linux-foundation.org: don't overwrite kstrtoull()'s errno]
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/res_counter.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/res_counter.c b/kernel/res_counter.c index 51dbac6a3633..e791130f85a7 100644 --- a/kernel/res_counter.c +++ b/kernel/res_counter.c @@ -186,8 +186,11 @@ int res_counter_memparse_write_strategy(const char *buf, /* return RES_COUNTER_MAX(unlimited) if "-1" is specified */ if (*buf == '-') { - res = simple_strtoull(buf + 1, &end, 10); - if (res != 1 || *end != '\0') + int rc = kstrtoull(buf + 1, 10, &res); + + if (rc) + return rc; + if (res != 1) return -EINVAL; *resp = RES_COUNTER_MAX; return 0; |