Skip to content

Commit

Permalink
net/mlx5: Fix error path for set HCA defaults
Browse files Browse the repository at this point in the history
In the case of the failure to execute mlx5_core_set_hca_defaults(),
we used wrong goto label to execute error unwind flow.

Fixes: 5bef709 ("net/mlx5: Enable host PF HCA after eswitch is initialized")
Reviewed-by: Saeed Mahameed <[email protected]>
Reviewed-by: Moshe Shemesh <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Reviewed-by: Parav Pandit <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
  • Loading branch information
rleon authored and Saeed Mahameed committed Jun 16, 2021
1 parent da5ac77 commit 94a4b84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ static int mlx5_load(struct mlx5_core_dev *dev)
err = mlx5_core_set_hca_defaults(dev);
if (err) {
mlx5_core_err(dev, "Failed to set hca defaults\n");
goto err_sriov;
goto err_set_hca;
}

mlx5_vhca_event_start(dev);
Expand Down Expand Up @@ -1194,6 +1194,7 @@ static int mlx5_load(struct mlx5_core_dev *dev)
mlx5_sf_hw_table_destroy(dev);
err_vhca:
mlx5_vhca_event_stop(dev);
err_set_hca:
mlx5_cleanup_fs(dev);
err_fs:
mlx5_accel_tls_cleanup(dev);
Expand Down

0 comments on commit 94a4b84

Please sign in to comment.