Re: [PATCH] RDMA/bnxt_re: Fix an error code in bnxt_qplib_create_srq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2018-01-31 at 11:06 +0530, Devesh Sharma wrote:
> On Wed, Jan 31, 2018 at 2:10 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> > We should return -ENOMEM if the allocation fails.  (The current code
> > returns succees).
> > 
> > Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > 
> > diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
> > index 8b5f11ac0e42..1b0e94697fe3 100644
> > --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
> > +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
> > @@ -557,8 +557,10 @@ int bnxt_qplib_create_srq(struct bnxt_qplib_res *res,
> > 
> >         srq->swq = kcalloc(srq->hwq.max_elements, sizeof(*srq->swq),
> >                            GFP_KERNEL);
> > -       if (!srq->swq)
> > +       if (!srq->swq) {
> > +               rc = -ENOMEM;
> >                 goto fail;
> > +       }
> 
> Opps!! my bad. Thanks for fixing.
> 
> Acked-By: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx>

Thanks, applied.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux