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

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

RDMA/ocrdma: Fix error return code in ocrdma_set_create_qp_rq_cmd()



Fix to return -ENOMEM in the alloc dma coherent error case instead of
0, as done elsewhere in this function.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 9884bcdc
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1886,7 +1886,7 @@ static int ocrdma_set_create_qp_rq_cmd(struct ocrdma_create_qp_req *cmd,


	qp->rq.va = dma_alloc_coherent(&pdev->dev, len, &pa, GFP_KERNEL);
	qp->rq.va = dma_alloc_coherent(&pdev->dev, len, &pa, GFP_KERNEL);
	if (!qp->rq.va)
	if (!qp->rq.va)
		return status;
		return -ENOMEM;
	memset(qp->rq.va, 0, len);
	memset(qp->rq.va, 0, len);
	qp->rq.pa = pa;
	qp->rq.pa = pa;
	qp->rq.len = len;
	qp->rq.len = len;