dynamic_debug: replace obselete simple_strtoul() with kstrtouint()
[cascardo/linux.git] / lib / dynamic_debug.c
index e488d9a..7288e38 100644 (file)
@@ -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;
        }