Merge tag 'v5.13-rc7' into rdma.git for-next
[linux-2.6-microblaze.git] / drivers / infiniband / sw / rxe / rxe_qp.c
index 3dd9e96..1ab6af7 100644 (file)
@@ -244,6 +244,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp,
        if (err) {
                vfree(qp->sq.queue->buf);
                kfree(qp->sq.queue);
+               qp->sq.queue = NULL;
                return err;
        }
 
@@ -304,6 +305,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp,
                if (err) {
                        vfree(qp->rq.queue->buf);
                        kfree(qp->rq.queue);
+                       qp->rq.queue = NULL;
                        return err;
                }
        }
@@ -366,6 +368,11 @@ int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd,
 err2:
        rxe_queue_cleanup(qp->sq.queue);
 err1:
+       qp->pd = NULL;
+       qp->rcq = NULL;
+       qp->scq = NULL;
+       qp->srq = NULL;
+
        if (srq)
                rxe_drop_ref(srq);
        rxe_drop_ref(scq);