From: Colin Ian King Date: Fri, 11 Sep 2020 10:35:09 +0000 (+0100) Subject: ipv6: remove redundant assignment to variable err X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2291267e48c848a6effaaae882e08319db805a63;p=linux.git ipv6: remove redundant assignment to variable err The variable err 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. Also re-order variable declarations in reverse Christmas tree ordering. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: David Ahern Signed-off-by: David S. Miller --- diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 5e7e25e2523ac..e8ee20720fe0d 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5284,9 +5284,10 @@ static int ip6_route_multipath_del(struct fib6_config *cfg, { struct fib6_config r_cfg; struct rtnexthop *rtnh; + int last_err = 0; int remaining; int attrlen; - int err = 1, last_err = 0; + int err; remaining = cfg->fc_mp_len; rtnh = (struct rtnexthop *)cfg->fc_mp;