1
0
Fork 0

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>
alistair/sensors
Colin Ian King 2020-04-09 14:41:26 +01:00 committed by David S. Miller
parent 6dbf02acef
commit 5f0224a6dd
1 changed files with 1 additions and 1 deletions

View File

@ -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;