diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-06-23 01:07:19 (GMT) |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-06-24 20:50:45 (GMT) |
commit | c94e15c5cb4d02579321382871eb87e17d10858e (patch) | |
tree | 2074fa96d9e65071eee6fd619cb72b862d92f757 /drivers/infiniband | |
parent | 9884bcdca30ae9f29a0d6af4a4577826b00c5d94 (diff) | |
download | linux-c94e15c5cb4d02579321382871eb87e17d10858e.tar.xz |
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')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 |
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 76c9e19..0965278 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; |