From: Wei Yongjun <yongjun_...@trendmicro.com.cn>

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_...@trendmicro.com.cn>
---
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c 
b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 71942af..672aba2 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -1900,7 +1900,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;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to