Skip to content

Commit 6f43e52

Browse files
Colin Ian Kingdavem330
authored andcommitted
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 <[email protected]> Reviewed-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6912378 commit 6f43e52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/nexthop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ static int nh_create_ipv6(struct net *net, struct nexthop *nh,
836836
.fc_encap = cfg->nh_encap,
837837
.fc_encap_type = cfg->nh_encap_type,
838838
};
839-
int err = -EINVAL;
839+
int err;
840840

841841
if (!ipv6_addr_any(&cfg->gw.ipv6))
842842
fib6_cfg.fc_flags |= RTF_GATEWAY;

0 commit comments

Comments
 (0)