Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 653f0a71 authored by Dan Carpenter's avatar Dan Carpenter Committed by Doug Ledford
Browse files

RDMA/bnxt_re: checking for NULL instead of IS_ERR()



bnxt_re_alloc_mw() doesn't return NULL, it returns error pointers.

Fixes: 9152e0b7 ("RDMA/bnxt_re: HW workarounds for handling specific conditions")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent af56e53c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;