summaryrefslogtreecommitdiffstats
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-04-09 14:41:26 +0100
committerDavid S. Miller <davem@davemloft.net>2020-04-09 10:14:53 -0700
commit5f0224a6ddc3101ab9664a5f7a6287047934a079 (patch)
tree2c3b074abc9e251131d95d455a4b26aba355a4cb /net/core/net-sysfs.c
parent6dbf02acef69b0742c238574583b3068afbd227c (diff)
downloadlinux-stable-5f0224a6ddc3101ab9664a5f7a6287047934a079.tar.gz
linux-stable-5f0224a6ddc3101ab9664a5f7a6287047934a079.tar.bz2
linux-stable-5f0224a6ddc3101ab9664a5f7a6287047934a079.zip
net-sysfs: remove redundant assignment to variable ret
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index cf0215734ceb..4773ad6ec111 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -80,7 +80,7 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr,
struct net_device *netdev = to_net_dev(dev);
struct net *net = dev_net(netdev);
unsigned long new;
- int ret = -EINVAL;
+ int ret;
if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
return -EPERM;