diff options
author | Amrani, Ram <Ram.Amrani@cavium.com> | 2016-12-22 07:40:34 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-22 11:36:12 -0500 |
commit | a121135973ca816821f4ff07aed523df82a91b8e (patch) | |
tree | 2c45f973e3144d6a693cc616bd7dffcc2fb089b0 | |
parent | c7eb3bced78fe83119b90d730ab58a572eb80e29 (diff) |
qedr: return error if destroy CQ failed
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>
-rw-r--r-- | drivers/infiniband/hw/qedr/verbs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 73df639755fa..cbccd7d3ae1e 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c | |||
@@ -985,8 +985,13 @@ int qedr_destroy_cq(struct ib_cq *ibcq) | |||
985 | 985 | ||
986 | /* GSIs CQs are handled by driver, so they don't exist in the FW */ | 986 | /* GSIs CQs are handled by driver, so they don't exist in the FW */ |
987 | if (cq->cq_type != QEDR_CQ_TYPE_GSI) { | 987 | if (cq->cq_type != QEDR_CQ_TYPE_GSI) { |
988 | int rc; | ||
989 | |||
988 | iparams.icid = cq->icid; | 990 | iparams.icid = cq->icid; |
989 | dev->ops->rdma_destroy_cq(dev->rdma_ctx, &iparams, &oparams); | 991 | rc = dev->ops->rdma_destroy_cq(dev->rdma_ctx, &iparams, |
992 | &oparams); | ||
993 | if (rc) | ||
994 | return rc; | ||
990 | dev->ops->common->chain_free(dev->cdev, &cq->pbl); | 995 | dev->ops->common->chain_free(dev->cdev, &cq->pbl); |
991 | } | 996 | } |
992 | 997 | ||