]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/ehca: Remove CQ-QP-link before destroying QP in error path of create_qp()
authorHoang-Nam Nguyen <hnguyen at de.ibm.com>
Thu, 17 Jan 2008 14:03:55 +0000 (15:03 +0100)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:43 +0000 (14:15 -0800)
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_qp.c

index f116eb7c0b1146e5dac6b3c8a75c4e0e09b24e2d..26c6a945459fba584b6760695200b6c6ccb3b384 100644 (file)
@@ -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);