projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cac92ba
)
kernel/res_counter.c: replace simple_strtoull by kstrtoull
author
Fabian Frederick
<
[email protected]
>
Wed, 4 Jun 2014 23:11:24 +0000
(16:11 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 4 Jun 2014 23:54:15 +0000
(16:54 -0700)
[
[email protected]
: don't overwrite kstrtoull()'s errno]
Signed-off-by: Fabian Frederick <
[email protected]
>
Cc: Michal Hocko <
[email protected]
>
Cc: Tejun Heo <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/res_counter.c
patch
|
blob
|
history
diff --git
a/kernel/res_counter.c
b/kernel/res_counter.c
index 51dbac6a363358b435a14f9e7952b9489eb3bf9d..e791130f85a7ace7bbfc4d412151b912d6b87d49 100644
(file)
--- 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;