OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1d7fc3
)
RDMA/bnxt_re: Fix an IS_ERR() vs NULL check
author
Dan Carpenter
<dan.carpenter@linaro.org>
Tue, 27 Jun 2023 07:20:13 +0000
(10:20 +0300)
committer
Jason Gunthorpe
<jgg@nvidia.com>
Tue, 27 Jun 2023 17:02:43 +0000
(14:02 -0300)
The bnxt_re_mmap_entry_insert() function returns NULL, not error pointers.
Update the check for errors accordingly.
Fixes:
360da60d6c6e
("RDMA/bnxt_re: Enable low latency push")
Link:
https://lore.kernel.org/r/8d92e85f-626b-4eca-8501-ca7024cfc0ee@moroto.mountain
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index
a936e0d
..
ef47c32
100644
(file)
--- a/
drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/
drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@
-4214,8
+4214,8
@@
static int UVERBS_HANDLER(BNXT_RE_METHOD_ALLOC_PAGE)(struct uverbs_attr_bundle *
}
entry = bnxt_re_mmap_entry_insert(uctx, dbr, mmap_flag, &mmap_offset);
- if (
IS_ERR(entry)
)
- return
PTR_ERR(entry)
;
+ if (
!entry
)
+ return
-ENOMEM
;
uobj->object = entry;
uverbs_finalize_uobj_create(attrs, BNXT_RE_ALLOC_PAGE_HANDLE);