diff mbox

[for-rc,2/3] RDMA/qedr: Fix rc initialization on CNQ allocation failure

Message ID 1521032555-19708-3-git-send-email-Michal.Kalderon@cavium.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Kalderon, Michal March 14, 2018, 1:02 p.m. UTC
Return code wasn't set properly when CNQ allocation failed

Fixes: ec72fce4 ("qedr: Add support for RoCE HW init")

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
---
 drivers/infiniband/hw/qedr/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Leon Romanovsky March 15, 2018, 7:34 a.m. UTC | #1
On Wed, Mar 14, 2018 at 03:02:34PM +0200, Michal Kalderon wrote:
> Return code wasn't set properly when CNQ allocation failed
>
> Fixes: ec72fce4 ("qedr: Add support for RoCE HW init")
>
> Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>

Michal,

Dave already asked it, but I'll repeat his request, please don't add extra
line after Fixes.

Thanks

> Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
> ---
Kalderon, Michal March 21, 2018, 12:49 p.m. UTC | #2
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> owner@vger.kernel.org] On Behalf Of Leon Romanovsky
> Sent: Thursday, March 15, 2018 9:35 AM
> To: Kalderon, Michal <Michal.Kalderon@cavium.com>
> Cc: dledford@redhat.com; jgg@mellanox.com; linux-rdma@vger.kernel.org;
> Bason, Yuval <Yuval.Bason@cavium.com>; Elior, Ariel
> <Ariel.Elior@cavium.com>
> Subject: Re: [PATCH for-rc 2/3] RDMA/qedr: Fix rc initialization on CNQ
> allocation failure
> 
> On Wed, Mar 14, 2018 at 03:02:34PM +0200, Michal Kalderon wrote:
> > Return code wasn't set properly when CNQ allocation failed
> >
> > Fixes: ec72fce4 ("qedr: Add support for RoCE HW init")
> >
> > Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
> 
> Michal,
> 
> Dave already asked it, but I'll repeat his request, please don't add extra line
> after Fixes.
Managed to miss this, sorry, will send v3
> 
> Thanks
> 
> > Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
> > ---
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c
index db4bf97..0ffb9b9 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -833,7 +833,8 @@  static struct qedr_dev *qedr_add(struct qed_dev *cdev, struct pci_dev *pdev,
 
 	dev->num_cnq = dev->ops->rdma_get_min_cnq_msix(cdev);
 	if (!dev->num_cnq) {
-		DP_ERR(dev, "not enough CNQ resources.\n");
+		DP_ERR(dev, "Failed. At least one CNQ is required.\n");
+		rc = -ENOMEM;
 		goto init_err;
 	}