Skip to content

Commit

Permalink
dynamic_debug: replace obselete simple_strtoul() with kstrtouint()
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Ryabinin <[email protected]>
Cc: Jason Baron <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
aryabinin authored and torvalds committed Jan 28, 2014
1 parent 3ace678 commit 4592599
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/dynamic_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,12 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords)
*/
static inline int parse_lineno(const char *str, unsigned int *val)
{
char *end = NULL;
BUG_ON(str == NULL);
if (*str == '\0') {
*val = 0;
return 0;
}
*val = simple_strtoul(str, &end, 10);
if (end == NULL || end == str || *end != '\0') {
if (kstrtouint(str, 10, val) < 0) {
pr_err("bad line-number: %s\n", str);
return -EINVAL;
}
Expand Down

0 comments on commit 4592599

Please sign in to comment.