Commit 94a4b841 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Saeed Mahameed

net/mlx5: Fix error path for set HCA defaults

In the case of the failure to execute mlx5_core_set_hca_defaults(),
we used wrong goto label to execute error unwind flow.

Fixes: 5bef709d ("net/mlx5: Enable host PF HCA after eswitch is initialized")
Reviewed-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Reviewed-by: default avatarParav Pandit <parav@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent da5ac772
...@@ -1161,7 +1161,7 @@ static int mlx5_load(struct mlx5_core_dev *dev) ...@@ -1161,7 +1161,7 @@ static int mlx5_load(struct mlx5_core_dev *dev)
err = mlx5_core_set_hca_defaults(dev); err = mlx5_core_set_hca_defaults(dev);
if (err) { if (err) {
mlx5_core_err(dev, "Failed to set hca defaults\n"); mlx5_core_err(dev, "Failed to set hca defaults\n");
goto err_sriov; goto err_set_hca;
} }
mlx5_vhca_event_start(dev); mlx5_vhca_event_start(dev);
...@@ -1194,6 +1194,7 @@ static int mlx5_load(struct mlx5_core_dev *dev) ...@@ -1194,6 +1194,7 @@ static int mlx5_load(struct mlx5_core_dev *dev)
mlx5_sf_hw_table_destroy(dev); mlx5_sf_hw_table_destroy(dev);
err_vhca: err_vhca:
mlx5_vhca_event_stop(dev); mlx5_vhca_event_stop(dev);
err_set_hca:
mlx5_cleanup_fs(dev); mlx5_cleanup_fs(dev);
err_fs: err_fs:
mlx5_accel_tls_cleanup(dev); mlx5_accel_tls_cleanup(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment