From: Colin Ian King Date: Thu, 30 May 2019 15:57:54 +0000 (+0100) Subject: nexthop: remove redundant assignment to err X-Git-Tag: tags/kvm-5.3-2~55^2~374 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6f43e5252833f346be429e9cf6946fb8a1977d73;p=users%2Fdwmw2%2Flinux.git 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 Reviewed-by: David Ahern Signed-off-by: David S. Miller --- diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index 1af8a329dacb9..7a5a3d08fec31 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;