From: Doug Ledford <dledford@redhat.com>
To: Devesh Sharma <devesh.sharma@broadcom.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Cc: Selvin Xavier <selvin.xavier@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma <linux-rdma@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] RDMA/bnxt_re: Fix an error code in bnxt_qplib_create_srq()
Date: Wed, 31 Jan 2018 16:19:54 +0000 [thread overview]
Message-ID: <1517415594.19117.17.camel@redhat.com> (raw)
In-Reply-To: <CANjDDBjO7ZWE+OAzBRUZh_233YrRf++aeB3BitFAZNGf2RS-5w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
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@oracle.com> 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@oracle.com>
> >
> > 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@broadcom.com>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-01-31 16:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 20:40 [PATCH] RDMA/bnxt_re: Fix an error code in bnxt_qplib_create_srq() Dan Carpenter
2018-01-31 5:48 ` Devesh Sharma
2018-01-31 16:19 ` Doug Ledford [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517415594.19117.17.camel@redhat.com \
--to=dledford@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=devesh.sharma@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox