]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Remove deadcode in mlxsw_sp_rif_mac_profile_find
authorDanielle Ratson <danieller@nvidia.com>
Tue, 23 Nov 2021 07:54:46 +0000 (09:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Nov 2021 11:44:31 +0000 (11:44 +0000)
commit2adcddbd254b61d09537f98dd39e276f39ff73b9
tree27f9eb756d8bfe4a3df0d6a570184482c5ca022d
parentb7adcd307c3a8199f266cd1136bbe80310f642c5
mlxsw: spectrum_router: Remove deadcode in mlxsw_sp_rif_mac_profile_find

The function idr_for_each_entry() already checks that the next entry in
the IDR is not NULL.

Therefore, checking that again in every iteration leads to deadcode.

Remove the unnecessary check in order to avoid that.

Addresses-Coverity: ("Logically dead code")
Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c