]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
RDMA/ocrdma: Fix error return code in ocrdma_set_create_qp_rq_cmd()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sun, 23 Jun 2013 01:07:19 +0000 (09:07 +0800)
committerRoland Dreier <roland@purestorage.com>
Mon, 24 Jun 2013 20:50:45 +0000 (13:50 -0700)
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>
drivers/infiniband/hw/ocrdma/ocrdma_hw.c

index 76c9e192ddccd0284b5af9c6726cbbe667d987af..0965278dd2ed7e805f7c1a8e1d9eae03b9c3765b 100644 (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;