diff options
author | Kalderon, Michal | 2018-03-21 13:51:51 +0100 |
---|---|---|
committer | Jason Gunthorpe | 2018-03-21 21:38:41 +0100 |
commit | b15606f47b89b0b09936d7f45b59ba6275527041 (patch) | |
tree | 881432198d8524c60705ffcc7dc9bc16258fadf0 | |
parent | RDMA/qedr: fix QP's ack timeout configuration (diff) | |
download | kernel-qcow2-linux-b15606f47b89b0b09936d7f45b59ba6275527041.tar.gz kernel-qcow2-linux-b15606f47b89b0b09936d7f45b59ba6275527041.tar.xz kernel-qcow2-linux-b15606f47b89b0b09936d7f45b59ba6275527041.zip |
RDMA/qedr: Fix rc initialization on CNQ allocation failure
Return code wasn't set properly when CNQ allocation failed.
This only affect error message logging, currently user will
receive an error message that says the qedr driver load failed
with rc '0', instead of ENOMEM
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>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r-- | drivers/infiniband/hw/qedr/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c index db4bf97c0e15..0ffb9b93e22d 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; } |