]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kernel/res_counter.c: replace simple_strtoull by kstrtoull
authorFabian Frederick <fabf@skynet.be>
Thu, 22 May 2014 00:43:31 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:31 +0000 (10:43 +1000)
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>
kernel/res_counter.c

index 51dbac6a363358b435a14f9e7952b9489eb3bf9d..f65a95c4b09c4d84f4402ac51d6658048e13c253 100644 (file)
@@ -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;