Skip to content

Commit

Permalink
RDMA/ocrdma: Fix check for NULL instead of IS_ERR
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Roland Dreier committed May 8, 2012
1 parent 3e4d60a commit 55a8d62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 55a8d62

Please sign in to comment.