From: Hoang-Nam Nguyen Date: Thu, 17 Jan 2008 14:03:55 +0000 (+0100) Subject: IB/ehca: Remove CQ-QP-link before destroying QP in error path of create_qp() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c86e280fe8a08d4ae30b77e46a1e7da28d756c9;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git IB/ehca: Remove CQ-QP-link before destroying QP in error path of create_qp() Signed-off-by: Hoang-Nam Nguyen Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index f116eb7c0b11..26c6a945459f 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c @@ -769,12 +769,15 @@ static struct ehca_qp *internal_create_qp( if (ib_copy_to_udata(udata, &resp, sizeof resp)) { ehca_err(pd->device, "Copy to udata failed"); ret = -EINVAL; - goto create_qp_exit4; + goto create_qp_exit5; } } return my_qp; +create_qp_exit5: + ehca_cq_unassign_qp(my_qp->send_cq, my_qp->real_qp_num); + create_qp_exit4: if (HAS_RQ(my_qp)) ipz_queue_dtor(my_pd, &my_qp->ipz_rqueue);