diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-05-02 09:13:57 +0300 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-05-08 11:17:49 -0700 |
commit | 55a8d62a3bd2a0536d526da817fd4f49e6470770 (patch) | |
tree | 3462e6a0fe6833b9e85b891ef6c5ead5f097bbe5 /drivers/infiniband | |
parent | 3e4d60a82e7ab4cd6e212b6834c6a48c79731957 (diff) | |
download | linux-stable-55a8d62a3bd2a0536d526da817fd4f49e6470770.tar.gz linux-stable-55a8d62a3bd2a0536d526da817fd4f49e6470770.tar.bz2 linux-stable-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/infiniband')
-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; } |