diff options
author | Andrey Ryabinin <a.ryabinin@samsung.com> | 2014-01-27 20:06:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-28 00:02:39 -0500 |
commit | 4592599af36f50ed2d3502ed1b2374f5af6cb1ae (patch) | |
tree | 7166f7d229f691941e5c45eb06b57679e178f354 /lib | |
parent | 3ace678fd1b246b75e01eeac0554de35656136a4 (diff) |
dynamic_debug: replace obselete simple_strtoul() with kstrtouint()
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Jason Baron <jbaron@akamai.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dynamic_debug.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index e488d9a03adc..7288e38e1757 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c | |||
@@ -268,14 +268,12 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords) | |||
268 | */ | 268 | */ |
269 | static inline int parse_lineno(const char *str, unsigned int *val) | 269 | static inline int parse_lineno(const char *str, unsigned int *val) |
270 | { | 270 | { |
271 | char *end = NULL; | ||
272 | BUG_ON(str == NULL); | 271 | BUG_ON(str == NULL); |
273 | if (*str == '\0') { | 272 | if (*str == '\0') { |
274 | *val = 0; | 273 | *val = 0; |
275 | return 0; | 274 | return 0; |
276 | } | 275 | } |
277 | *val = simple_strtoul(str, &end, 10); | 276 | if (kstrtouint(str, 10, val) < 0) { |
278 | if (end == NULL || end == str || *end != '\0') { | ||
279 | pr_err("bad line-number: %s\n", str); | 277 | pr_err("bad line-number: %s\n", str); |
280 | return -EINVAL; | 278 | return -EINVAL; |
281 | } | 279 | } |