Message ID | 20200527081555.124615-1-colin.king@canonical.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [V2,net-next] mlxsw: spectrum_router: remove redundant initialization of pointer br_dev | expand |
On Wed, May 27, 2020 at 09:15:55AM +0100, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > The pointer br_dev is being initialized with a value that is never read > and is being updated with a new value later on. The initialization > is redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Thanks
From: Colin King <colin.king@canonical.com> Date: Wed, 27 May 2020 09:15:55 +0100 > From: Colin Ian King <colin.king@canonical.com> > > The pointer br_dev is being initialized with a value that is never read > and is being updated with a new value later on. The initialization > is redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King <colin.king@canonical.com> Applied.
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 71aee4914619..c425b78c6093 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -7572,7 +7572,7 @@ static struct mlxsw_sp_fid * mlxsw_sp_rif_vlan_fid_get(struct mlxsw_sp_rif *rif, struct netlink_ext_ack *extack) { - struct net_device *br_dev = rif->dev; + struct net_device *br_dev; u16 vid; int err;