]> Pileus Git - ~andy/linux/blobdiff - net/core/netpoll.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[~andy/linux] / net / core / netpoll.c
index 77a0388fc3beccbf39187e357c7a1b4c93f09d73..3151acf5ec13afb34480a28a3f4a73deae69990a 100644 (file)
@@ -674,7 +674,8 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
                if ((delim = strchr(cur, '@')) == NULL)
                        goto parse_failed;
                *delim = 0;
-               np->local_port = simple_strtol(cur, NULL, 10);
+               if (kstrtou16(cur, 10, &np->local_port))
+                       goto parse_failed;
                cur = delim;
        }
        cur++;
@@ -705,7 +706,8 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
                *delim = 0;
                if (*cur == ' ' || *cur == '\t')
                        np_info(np, "warning: whitespace is not allowed\n");
-               np->remote_port = simple_strtol(cur, NULL, 10);
+               if (kstrtou16(cur, 10, &np->remote_port))
+                       goto parse_failed;
                cur = delim;
        }
        cur++;