diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-07-10 10:22:47 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-20 18:20:49 +0300 |
commit | 653f0a71daf1a71d55d3af368c28c8114c11c607 (patch) | |
tree | 2cb5c96ca2858dd61e19f2b6f6bfcfaae5aed027 /drivers/infiniband | |
parent | af56e53ccd29bda062a1ae75276dc9c0f8eedf47 (diff) | |
download | linux-653f0a71daf1a71d55d3af368c28c8114c11c607.tar.xz |
RDMA/bnxt_re: checking for NULL instead of IS_ERR()
bnxt_re_alloc_mw() doesn't return NULL, it returns error pointers.
Fixes: 9152e0b722b2 ("RDMA/bnxt_re: HW workarounds for handling specific conditions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index c7bd68311d0c..e794b0fa4ae6 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -588,10 +588,10 @@ static int bnxt_re_create_fence_mr(struct bnxt_re_pd *pd) /* Create a fence MW only for kernel consumers */ mw = bnxt_re_alloc_mw(&pd->ib_pd, IB_MW_TYPE_1, NULL); - if (!mw) { + if (IS_ERR(mw)) { dev_err(rdev_to_dev(rdev), "Failed to create fence-MW for PD: %p\n", pd); - rc = -EINVAL; + rc = PTR_ERR(mw); goto fail; } fence->mw = mw; |