Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00bedd73 authored by Parav Pandit's avatar Parav Pandit Committed by Greg Kroah-Hartman
Browse files

net/mlx5: E-switch, Destroy TSAR when fail to enable the mode



[ Upstream commit 2b8e9c7c3fd0e31091edb1c66cc06ffe4988ca21 ]

When either esw_legacy_enable() or esw_offloads_enable() fails,
code missed to destroy the created TSAR.

Hence, add the missing call to destroy the TSAR.

Fixes: 610090eb ("net/mlx5: E-switch, Initialize TSAR Qos hardware block before its user vports")
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d70f9a3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1919,7 +1919,7 @@ int mlx5_eswitch_enable(struct mlx5_eswitch *esw, int mode)
		mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB);
		mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH);
	}

	esw_destroy_tsar(esw);
	return err;
}