Convert deprecated simple_strtoul() usage.

Signed-off-by: Alexey Dobriyan <[email protected]>
---

 fs/9p/v9fs.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -116,7 +116,7 @@ static int v9fs_parse_options(struct v9fs_session_info 
*v9ses, char *opts)
        substring_t args[MAX_OPT_ARGS];
        char *p;
        int option = 0;
-       char *s, *e;
+       char *s;
        int ret = 0;
 
        /* setup defaults */
@@ -269,8 +269,10 @@ static int v9fs_parse_options(struct v9fs_session_info 
*v9ses, char *opts)
                        } else {
                                uid_t uid;
                                v9ses->flags |= V9FS_ACCESS_SINGLE;
-                               uid = simple_strtoul(s, &e, 10);
-                               if (*e != '\0') {
+                               ret = parse_integer(s, 10, &uid);
+                               if (ret < 0)
+                                       return ret;
+                               if (s[ret] != '\0') {
                                        ret = -EINVAL;
                                        pr_info("Unknown access argument %s\n",
                                                s);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to