summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_utils.c
diff options
context:
space:
mode:
authorLeon Romanovsky2019-05-28 13:37:28 +0200
committerDoug Ledford2019-06-11 22:17:10 +0200
commita52c8e2469c30cf7ac453d624aed9c168b23d1af (patch)
tree6e2b5b8f8d37a23f0ebe3630bb0fb1202e8d10f5 /drivers/infiniband/hw/nes/nes_utils.c
parentRDMA/nes: Avoid memory allocation during CQ destroy (diff)
downloadkernel-qcow2-linux-a52c8e2469c30cf7ac453d624aed9c168b23d1af.tar.gz
kernel-qcow2-linux-a52c8e2469c30cf7ac453d624aed9c168b23d1af.tar.xz
kernel-qcow2-linux-a52c8e2469c30cf7ac453d624aed9c168b23d1af.zip
RDMA: Clean destroy CQ in drivers do not return errors
Like all other destroy commands, .destroy_cq() call is not supposed to fail. In all flows, the attempt to return earlier caused to memory leaks. This patch converts .destroy_cq() to do not return any errors. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Acked-by: Gal Pressman <galpress@amazon.com> Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_utils.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_utils.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_utils.c b/drivers/infiniband/hw/nes/nes_utils.c
index 90f28890246d..e976292fc6c0 100644
--- a/drivers/infiniband/hw/nes/nes_utils.c
+++ b/drivers/infiniband/hw/nes/nes_utils.c
@@ -588,9 +588,7 @@ struct nes_cqp_request *nes_get_cqp_request(struct nes_device *nesdev)
cqp_request->callback = 0;
nes_debug(NES_DBG_CQP, "Got cqp request %p from the available list \n",
cqp_request);
- } else
- printk(KERN_ERR PFX "%s: Could not allocated a CQP request.\n",
- __func__);
+ }
return cqp_request;
}