aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-05-30 16:57:54 +0100
committerDavid S. Miller <davem@davemloft.net>2019-05-31 14:33:52 -0700
commit6f43e5252833f346be429e9cf6946fb8a1977d73 (patch)
tree2967cc3d083e7a610171d66e431d9192a8f4db16 /net
parentMerge branch 'phylink-sfp-updates' (diff)
downloadlinux-dev-6f43e5252833f346be429e9cf6946fb8a1977d73.tar.xz
linux-dev-6f43e5252833f346be429e9cf6946fb8a1977d73.zip
nexthop: remove redundant assignment to err
The variable err is initialized with a value that is never read and err is reassigned a few statements later. This initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/nexthop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 1af8a329dacb..7a5a3d08fec3 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -836,7 +836,7 @@ static int nh_create_ipv6(struct net *net, struct nexthop *nh,
.fc_encap = cfg->nh_encap,
.fc_encap_type = cfg->nh_encap_type,
};
- int err = -EINVAL;
+ int err;
if (!ipv6_addr_any(&cfg->gw.ipv6))
fib6_cfg.fc_flags |= RTF_GATEWAY;