From: Fabian Frederick Date: Thu, 22 May 2014 00:43:31 +0000 (+1000) Subject: kernel/res_counter.c: replace simple_strtoull by kstrtoull X-Git-Tag: next-20140530~2^2~197 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=be3f61abff0b9b16db3e1d1cb63b0a5fd55a8e1f;p=karo-tx-linux.git kernel/res_counter.c: replace simple_strtoull by kstrtoull Signed-off-by: Fabian Frederick Cc: Michal Hocko Cc: Tejun Heo Signed-off-by: Andrew Morton --- diff --git a/kernel/res_counter.c b/kernel/res_counter.c index 51dbac6a3633..f65a95c4b09c 100644 --- a/kernel/res_counter.c +++ b/kernel/res_counter.c @@ -186,8 +186,8 @@ 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 ((res != 1) || rc) return -EINVAL; *resp = RES_COUNTER_MAX; return 0;