summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-06-23 03:07:19 +0200
committerRoland Dreier <roland@purestorage.com>2013-06-24 22:50:45 +0200
commitc94e15c5cb4d02579321382871eb87e17d10858e (patch)
tree2074fa96d9e65071eee6fd619cb72b862d92f757 /drivers/infiniband/hw/ocrdma
parentRDMA/ocrdma: Reorg structures to avoid padding (diff)
downloadlinux-c94e15c5cb4d02579321382871eb87e17d10858e.tar.xz
linux-c94e15c5cb4d02579321382871eb87e17d10858e.zip
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>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 76c9e192ddcc..0965278dd2ed 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -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;