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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
Wei Yongjun 2013-06-23 09:07:19 +08:00 committed by Roland Dreier
parent 9884bcdca3
commit c94e15c5cb

View file

@ -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;