net: rtnetlink: remove redundant assignment to variable err
authorColin Ian King <colin.king@canonical.com>
Sat, 25 Apr 2020 11:28:14 +0000 (12:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Apr 2020 18:14:07 +0000 (11:14 -0700)
The variable err is being initializeed 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>
net/core/rtnetlink.c

index d6f4f4a9e8ba35e96d2b32e0b639dae35efa1c9d..2269199c589107659bc82fc0e13804b11d7de8ba 100644 (file)
@@ -3997,8 +3997,8 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,
        struct ndmsg *ndm;
        struct nlattr *tb[NDA_MAX+1];
        struct net_device *dev;
-       int err = -EINVAL;
        __u8 *addr;
+       int err;
        u16 vid;
 
        if (!netlink_capable(skb, CAP_NET_ADMIN))