mlxsw: spectrum_router: remove redundant initialization of pointer br_dev
authorColin Ian King <colin.king@canonical.com>
Wed, 27 May 2020 08:15:55 +0000 (09:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 18:23:27 +0000 (11:23 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

index c939b35..770de02 100644 (file)
@@ -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;