diff options
author | Bernard Zhao <bernard@vivo.com> | 2021-11-18 18:06:42 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-19 14:16:42 +0000 |
commit | 520fbdf7fb19b7744e370d36d9244a446299ceb7 (patch) | |
tree | 6a777633bcccc5395c16c503c5e2bdad7a238ce6 /net/bridge | |
parent | eaa54d66145e4314eb785a507341a7c8b13f6df8 (diff) | |
download | linux-520fbdf7fb19b7744e370d36d9244a446299ceb7.tar.bz2 |
net/bridge: replace simple_strtoul to kstrtol
simple_strtoull is obsolete, use kstrtol instead.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_sysfs_br.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index d9a89ddd0331..11c490694296 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c @@ -36,15 +36,14 @@ static ssize_t store_bridge_parm(struct device *d, struct net_bridge *br = to_bridge(d); struct netlink_ext_ack extack = {0}; unsigned long val; - char *endp; int err; if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) return -EPERM; - val = simple_strtoul(buf, &endp, 0); - if (endp == buf) - return -EINVAL; + err = kstrtoul(buf, 10, &val); + if (err != 0) + return err; if (!rtnl_trylock()) return restart_syscall(); |