diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-05-02 08:13:57 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-05-08 20:17:49 +0200 |
commit | 55a8d62a3bd2a0536d526da817fd4f49e6470770 (patch) | |
tree | 3462e6a0fe6833b9e85b891ef6c5ead5f097bbe5 /drivers | |
parent | RDMA/ocrdma: Don't sleep in atomic notifier handler (diff) | |
download | linux-55a8d62a3bd2a0536d526da817fd4f49e6470770.tar.xz linux-55a8d62a3bd2a0536d526da817fd4f49e6470770.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index eb55c80fa7d3..0d1872faa6ab 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -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; } |