Skip to content

Commit 4251f63

Browse files
Dan Carpenterjgunthorpe
authored andcommitted
RDMA/bnxt_re: Fix an IS_ERR() vs NULL check
The bnxt_re_mmap_entry_insert() function returns NULL, not error pointers. Update the check for errors accordingly. Fixes: 360da60 ("RDMA/bnxt_re: Enable low latency push") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent d1d7fc3 commit 4251f63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/infiniband/hw/bnxt_re/ib_verbs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4214,8 +4214,8 @@ static int UVERBS_HANDLER(BNXT_RE_METHOD_ALLOC_PAGE)(struct uverbs_attr_bundle *
42144214
}
42154215

42164216
entry = bnxt_re_mmap_entry_insert(uctx, dbr, mmap_flag, &mmap_offset);
4217-
if (IS_ERR(entry))
4218-
return PTR_ERR(entry);
4217+
if (!entry)
4218+
return -ENOMEM;
42194219

42204220
uobj->object = entry;
42214221
uverbs_finalize_uobj_create(attrs, BNXT_RE_ALLOC_PAGE_HANDLE);

0 commit comments

Comments
 (0)