Skip to content

Commit

Permalink
net/mlx5: Add forgotten cleanup calls into mlx5_init_once() error path
Browse files Browse the repository at this point in the history
[ Upstream commit 2a35b2c ]

There are two cleanup calls missing in mlx5_init_once() error path.
Add them making the error path flow to be the same as
mlx5_cleanup_once().

Fixes: 52ec462 ("net/mlx5: Add reserved-gids support")
Fixes: 7c39afb ("net/mlx5: PTP code migration to driver core section")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Jiri Pirko authored and gregkh committed Jan 12, 2023
1 parent 8aa8975 commit 3c29ad4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/main.c
Expand Up @@ -1051,6 +1051,8 @@ static int mlx5_init_once(struct mlx5_core_dev *dev)
err_tables_cleanup:
mlx5_geneve_destroy(dev->geneve);
mlx5_vxlan_destroy(dev->vxlan);
mlx5_cleanup_clock(dev);
mlx5_cleanup_reserved_gids(dev);
mlx5_cq_debugfs_cleanup(dev);
mlx5_fw_reset_cleanup(dev);
err_events_cleanup:
Expand Down

0 comments on commit 3c29ad4

Please sign in to comment.