Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55e57a78 authored by Wei Yongjun's avatar Wei Yongjun Committed by Roland Dreier
Browse files

RDMA/cxgb4: Fix error return code in create_qp()



Fix to return a negative error code from the error handling case
instead of 0, as returned elsewhere in this function.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent a937536b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -186,8 +186,10 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
	wq->rq.queue = dma_alloc_coherent(&(rdev->lldi.pdev->dev),
					  wq->rq.memsize, &(wq->rq.dma_addr),
					  GFP_KERNEL);
	if (!wq->rq.queue)
	if (!wq->rq.queue) {
		ret = -ENOMEM;
		goto free_sq;
	}
	PDBG("%s sq base va 0x%p pa 0x%llx rq base va 0x%p pa 0x%llx\n",
		__func__, wq->sq.queue,
		(unsigned long long)virt_to_phys(wq->sq.queue),