From: Colin Ian King Date: Wed, 27 May 2020 08:15:55 +0000 (+0100) Subject: mlxsw: spectrum_router: remove redundant initialization of pointer br_dev X-Git-Tag: baikal/mips/sdk5.9~13530^2~91 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=47358b735d2f69f5abf7f9f7bb53e491a3d23549;p=kernel.git mlxsw: spectrum_router: remove redundant initialization of pointer br_dev 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 Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index c939b3596566f..770de0222e7bd 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -7574,7 +7574,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;