Commit 00bedd730d1f038911c607c4e559078bf214d6b9

Authored by Parav Pandit
Committed by Greg Kroah-Hartman
1 parent d70f9a3cc3

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: 610090ebce92 ("net/mlx5: E-switch, Initialize TSAR Qos hardware block before its user vports")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
... ... @@ -1919,7 +1919,7 @@
1919 1919 mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB);
1920 1920 mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH);
1921 1921 }
1922   -
  1922 + esw_destroy_tsar(esw);
1923 1923 return err;
1924 1924 }
1925 1925