Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8091b895 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds
Browse files

fs/ncpfs/getopt.c: replace simple_strtoul by kstrtoul



Remove obsolete simple_strtoul in ncp_getopt

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Cc: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 647f010b
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -53,15 +53,14 @@ int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts
				return -EINVAL;
			}
			if (opts->has_arg & OPT_INT) {
				char* v;
				int rc = kstrtoul(val, 0, value);

				*value = simple_strtoul(val, &v, 0);
				if (!*v) {
					return opts->val;
				}
				if (rc) {
					pr_info("%s: invalid numeric value in %s=%s\n",
						caller, token, val);
				return -EDOM;
					return rc;
				}
				return opts->val;
			}
			if (opts->has_arg & OPT_STRING) {
				return opts->val;