aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-09-11 11:35:09 +0100
committerDavid S. Miller <davem@davemloft.net>2020-09-11 14:48:25 -0700
commit2291267e48c848a6effaaae882e08319db805a63 (patch)
tree1e3e431e51191992311282bc36b9fda3d62307e8 /net/ipv6
parentMerge branch 'ag71xx-add-ethtool-and-flow-control-support' (diff)
downloadlinux-dev-2291267e48c848a6effaaae882e08319db805a63.tar.xz
linux-dev-2291267e48c848a6effaaae882e08319db805a63.zip
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 <colin.king@canonical.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 5e7e25e2523a..e8ee20720fe0 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;