diff options
author | Parav Pandit <parav@nvidia.com> | 2021-01-13 13:17:00 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-01-14 17:51:18 +0100 |
commit | 2cb091f6293df898b47f4e0f2e54324e2bbaf816 (patch) | |
tree | 69de143fdfa75e582cff7475759d281d4e27ea26 /drivers/infiniband | |
parent | RDMA/umem: Avoid undefined behavior of rounddown_pow_of_two() (diff) | |
download | linux-2cb091f6293df898b47f4e0f2e54324e2bbaf816.tar.xz linux-2cb091f6293df898b47f4e0f2e54324e2bbaf816.zip |
IB/mlx5: Fix error unwinding when set_has_smi_cap fails
When set_has_smi_cap() fails, multiport master cleanup is missed. Fix it
by doing the correct error unwinding goto.
Fixes: a989ea01cb10 ("RDMA/mlx5: Move SMI caps logic")
Link: https://lore.kernel.org/r/20210113121703.559778-3-leon@kernel.org
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 3bae9ba0ead8..fbe3b75f866b 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -3956,7 +3956,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++) { |