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

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
......@@ -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);
if (!qp->rq.va)
return status;
return -ENOMEM;
memset(qp->rq.va, 0, len);
qp->rq.pa = pa;
qp->rq.len = len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment