Skip to content

Commit 520fbdf

Browse files
Bernard Zhaodavem330
authored andcommitted
net/bridge: replace simple_strtoul to kstrtol
simple_strtoull is obsolete, use kstrtol instead. Signed-off-by: Bernard Zhao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent eaa54d6 commit 520fbdf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

net/bridge/br_sysfs_br.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ static ssize_t store_bridge_parm(struct device *d,
3636
struct net_bridge *br = to_bridge(d);
3737
struct netlink_ext_ack extack = {0};
3838
unsigned long val;
39-
char *endp;
4039
int err;
4140

4241
if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN))
4342
return -EPERM;
4443

45-
val = simple_strtoul(buf, &endp, 0);
46-
if (endp == buf)
47-
return -EINVAL;
44+
err = kstrtoul(buf, 10, &val);
45+
if (err != 0)
46+
return err;
4847

4948
if (!rtnl_trylock())
5049
return restart_syscall();

0 commit comments

Comments
 (0)