Skip to content

Commit

Permalink
RDMA/ocrdma: Fix error return code in ocrdma_set_create_qp_rq_cmd()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Roland Dreier committed Jun 24, 2013
1 parent 9884bcd commit c94e15c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/ocrdma/ocrdma_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c94e15c

Please sign in to comment.