On Tue, Jun 27, 2023 at 12:50 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > 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") > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Acked-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx> > --- > drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 ++-- > 1 file 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 df757da95ac2..abef0b8baa7c 100644 > --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c > +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c > @@ -4213,8 +4213,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); > -- > 2.39.2 >
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature