qedr: return error if destroy CQ failed
authorAmrani, Ram <Ram.Amrani@cavium.com>
Thu, 22 Dec 2016 12:40:34 +0000 (14:40 +0200)
committerDoug Ledford <dledford@redhat.com>
Thu, 22 Dec 2016 16:36:12 +0000 (11:36 -0500)
Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Reviewed-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qedr/verbs.c

index 73df639755fa1a68f64a506f74f4ab3a2b910939..cbccd7d3ae1e922e9d43293513fb493d1a6ecfd5 100644 (file)
@@ -985,8 +985,13 @@ int qedr_destroy_cq(struct ib_cq *ibcq)
 
        /* GSIs CQs are handled by driver, so they don't exist in the FW */
        if (cq->cq_type != QEDR_CQ_TYPE_GSI) {
+               int rc;
+
                iparams.icid = cq->icid;
-               dev->ops->rdma_destroy_cq(dev->rdma_ctx, &iparams, &oparams);
+               rc = dev->ops->rdma_destroy_cq(dev->rdma_ctx, &iparams,
+                                              &oparams);
+               if (rc)
+                       return rc;
                dev->ops->common->chain_free(dev->cdev, &cq->pbl);
        }