Skip to content

Commit

Permalink
nexthops: remove redundant assignment to variable err
Browse files Browse the repository at this point in the history
Variable err is initialized to a value that is never read and it is
re-assigned later. The 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]>
  • Loading branch information
Colin Ian King authored and davem330 committed Aug 22, 2019
1 parent 8da3803 commit c76c992
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/nexthop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ static int nh_create_ipv4(struct net *net, struct nexthop *nh,
.fc_encap_type = cfg->nh_encap_type,
};
u32 tb_id = l3mdev_fib_table(cfg->dev);
int err = -EINVAL;
int err;

err = fib_nh_init(net, fib_nh, &fib_cfg, 1, extack);
if (err) {
Expand Down

0 comments on commit c76c992

Please sign in to comment.