summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorShuah Khan <shuahkhan@gmail.com>2012-04-12 09:28:13 (GMT)
committerDavid S. Miller <davem@davemloft.net>2012-04-12 20:09:08 (GMT)
commite1e420c71b53829c661123a21b14a42d821e5e7f (patch)
treedbe4071bf29c78ff329215ab391903cdbdcec591 /net
parent1caf09df78a1b40604f200f419b08819e139b858 (diff)
downloadlinux-fsl-qoriq-e1e420c71b53829c661123a21b14a42d821e5e7f.tar.xz
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')
-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 4955862..97d0f24 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,
int (*set)(struct net_device *, unsigned long))
{
struct net_device *net = to_net_dev(dev);
- char *endp;
unsigned long new;
int ret = -EINVAL;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
- new = simple_strtoul(buf, &endp, 0);
- if (endp == buf)
+ ret = kstrtoul(buf, 0, &new);
+ if (ret)
goto err;
if (!rtnl_trylock())