mlxsw: spectrum_switchdev: Add error path in mlxsw_sp_port_mc_disabled_set()
authorAmit Cohen <amcohen@nvidia.com>
Tue, 21 Jun 2022 08:33:37 +0000 (11:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jun 2022 11:56:57 +0000 (12:56 +0100)
commitc96a9919c79e61e791c561a9c9c2ce56371866a1
tree328bc8832232222cccc0cc18d5bd3b9b8528e946
parenta6f43b1dad800d816d62dc478e68eb5230a9465c
mlxsw: spectrum_switchdev: Add error path in mlxsw_sp_port_mc_disabled_set()

The above mentioned function just returns an error in case that
mlxsw_sp_bridge_ports_flood_table_set() fails. That means that the previous
configurations are not cleaned.

Fix it by adding error path to clean the configurations in case of error.

Signed-off-by: Amit Cohen <amcohen@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_switchdev.c