mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
3e4d60a82e
commit
55a8d62a3b
@ -486,8 +486,8 @@ struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *ibpd, int acc)
|
|||||||
struct ocrdma_mr *mr;
|
struct ocrdma_mr *mr;
|
||||||
|
|
||||||
mr = ocrdma_alloc_lkey(ibpd, acc, 0, OCRDMA_ADDR_CHECK_DISABLE);
|
mr = ocrdma_alloc_lkey(ibpd, acc, 0, OCRDMA_ADDR_CHECK_DISABLE);
|
||||||
if (!mr)
|
if (IS_ERR(mr))
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_CAST(mr);
|
||||||
|
|
||||||
return &mr->ibmr;
|
return &mr->ibmr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user