Commit 520fbdf7 authored by Bernard Zhao's avatar Bernard Zhao Committed by David S. Miller

net/bridge: replace simple_strtoul to kstrtol

simple_strtoull is obsolete, use kstrtol instead.
Signed-off-by: default avatarBernard Zhao <bernard@vivo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eaa54d66
...@@ -36,15 +36,14 @@ static ssize_t store_bridge_parm(struct device *d, ...@@ -36,15 +36,14 @@ static ssize_t store_bridge_parm(struct device *d,
struct net_bridge *br = to_bridge(d); struct net_bridge *br = to_bridge(d);
struct netlink_ext_ack extack = {0}; struct netlink_ext_ack extack = {0};
unsigned long val; unsigned long val;
char *endp;
int err; int err;
if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN))
return -EPERM; return -EPERM;
val = simple_strtoul(buf, &endp, 0); err = kstrtoul(buf, 10, &val);
if (endp == buf) if (err != 0)
return -EINVAL; return err;
if (!rtnl_trylock()) if (!rtnl_trylock())
return restart_syscall(); return restart_syscall();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment