From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@nvidia.com>
Cc: Parav Pandit <parav@nvidia.com>,
Aharon Landau <aharonl@nvidia.com>,
linux-rdma@vger.kernel.org, Maor Gottlieb <maorg@mellanox.com>,
Mark Bloch <mbloch@nvidia.com>
Subject: [PATCH rdma-next 2/5] IB/mlx5: Fix error unwinding when set_has_smi_cap fails
Date: Wed, 13 Jan 2021 14:17:00 +0200 [thread overview]
Message-ID: <20210113121703.559778-3-leon@kernel.org> (raw)
In-Reply-To: <20210113121703.559778-1-leon@kernel.org>
From: Parav Pandit <parav@nvidia.com>
When set_has_smi_cap() fails, multiport master cleanup is missed.
Fix it by doing correct error unwinding.
Fixes: a989ea01cb10 ("RDMA/mlx5: Move SMI caps logic")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx5/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 36f8ae4fe619..4f21e561f73e 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -3978,7 +3978,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++) {
--
2.29.2
next prev parent reply other threads:[~2021-01-13 12:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 12:16 [PATCH rdma-next 0/5] Set of fixes Leon Romanovsky
2021-01-13 12:16 ` [PATCH rdma-next 1/5] RDMA/umem: Avoid undefined behavior of rounddown_pow_of_two Leon Romanovsky
2021-01-13 12:17 ` Leon Romanovsky [this message]
2021-01-13 12:17 ` [PATCH rdma-next 3/5] IB/mlx5: Add mutex destroy call to cap_mask_mutex mutex Leon Romanovsky
2021-01-13 12:17 ` [PATCH rdma-next 4/5] IB/mlx5: Make function static Leon Romanovsky
2021-01-13 12:17 ` [PATCH rdma-next 5/5] RDMA/mlx5: Fix wrong free of blue flame register on error Leon Romanovsky
2021-01-14 17:04 ` [PATCH rdma-next 0/5] Set of fixes Jason Gunthorpe
2021-01-14 17:36 ` Leon Romanovsky
2021-01-20 0:15 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210113121703.559778-3-leon@kernel.org \
--to=leon@kernel.org \
--cc=aharonl@nvidia.com \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=mbloch@nvidia.com \
--cc=parav@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).