提交 55a8d62a 编写于 作者: D Dan Carpenter 提交者: Roland Dreier

RDMA/ocrdma: Fix check for NULL instead of IS_ERR

The ocrdma_alloc_lkey() function never returns NULL pointers -- it
returns ERR_PTRs.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 3e4d60a8
......@@ -486,8 +486,8 @@ struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *ibpd, int acc)
struct ocrdma_mr *mr;
mr = ocrdma_alloc_lkey(ibpd, acc, 0, OCRDMA_ADDR_CHECK_DISABLE);
if (!mr)
return ERR_PTR(-ENOMEM);
if (IS_ERR(mr))
return ERR_CAST(mr);
return &mr->ibmr;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册