aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
authorShuah Khan <shuahkhan@gmail.com>2012-04-12 05:28:13 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-12 16:09:08 -0400
commite1e420c71b53829c661123a21b14a42d821e5e7f (patch)
treedbe4071bf29c78ff329215ab391903cdbdcec591 /net/core/net-sysfs.c
parent1caf09df78a1b40604f200f419b08819e139b858 (diff)
net/core: simple_strtoul cleanup
Changed net/core/net-sysfs.c: netdev_store() to use kstrtoul() instead of obsolete simple_strtoul(). Signed-off-by: Shuah Khan <shuahkhan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r--net/core/net-sysfs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 495586232aa1..97d0f2453a0e 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -74,15 +74,14 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr,
74 int (*set)(struct net_device *, unsigned long)) 74 int (*set)(struct net_device *, unsigned long))
75{ 75{
76 struct net_device *net = to_net_dev(dev); 76 struct net_device *net = to_net_dev(dev);
77 char *endp;
78 unsigned long new; 77 unsigned long new;
79 int ret = -EINVAL; 78 int ret = -EINVAL;
80 79
81 if (!capable(CAP_NET_ADMIN)) 80 if (!capable(CAP_NET_ADMIN))
82 return -EPERM; 81 return -EPERM;
83 82
84 new = simple_strtoul(buf, &endp, 0); 83 ret = kstrtoul(buf, 0, &new);
85 if (endp == buf) 84 if (ret)
86 goto err; 85 goto err;
87 86
88 if (!rtnl_trylock()) 87 if (!rtnl_trylock())