From be3f61abff0b9b16db3e1d1cb63b0a5fd55a8e1f Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Thu, 22 May 2014 10:43:31 +1000 Subject: [PATCH] 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 --- kernel/res_counter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5