Skip to content

Commit

Permalink
IB/mlx5: Fix error unwinding when set_has_smi_cap fails
Browse files Browse the repository at this point in the history
commit 2cb091f upstream.

When set_has_smi_cap() fails, multiport master cleanup is missed. Fix it
by doing the correct error unwinding goto.

Fixes: a989ea0 ("RDMA/mlx5: Move SMI caps logic")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Parav Pandit <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
paravmellanox authored and gregkh committed Jan 19, 2021
1 parent bc296e4 commit 5cd483a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/mlx5/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3950,7 +3950,7 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)

err = set_has_smi_cap(dev);
if (err)
return err;
goto err_mp;

if (!mlx5_core_mp_enabled(mdev)) {
for (i = 1; i <= dev->num_ports; i++) {
Expand Down

0 comments on commit 5cd483a

Please sign in to comment.