From: Leon Romanovsky <leon@kernel.org>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: Sagi Grimberg <sagi@grimberg.me>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH] iser-target: Fix error return code in isert_alloc_login_buf()
Date: Fri, 5 Aug 2016 17:36:09 +0300 [thread overview]
Message-ID: <20160805143609.GM27667@leon.nu> (raw)
In-Reply-To: <1470404968-17339-1-git-send-email-weiyj.lk@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
On Fri, Aug 05, 2016 at 01:49:28PM +0000, Wei Yongjun wrote:
> Fix to return error code -ENOMEM from the alloc error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
> ---
> drivers/infiniband/ulp/isert/ib_isert.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
> index ba6be06..65af523 100644
> --- a/drivers/infiniband/ulp/isert/ib_isert.c
> +++ b/drivers/infiniband/ulp/isert/ib_isert.c
> @@ -449,6 +449,7 @@ isert_alloc_login_buf(struct isert_conn *isert_conn,
> isert_conn->login_rsp_buf = kzalloc(ISER_RX_PAYLOAD_SIZE, GFP_KERNEL);
> if (!isert_conn->login_rsp_buf) {
> isert_err("Unable to allocate isert_conn->login_rspbuf\n");
Please remove the line above too.
There is no chance to miss kzalloc allocation failure.
> + ret = -ENOMEM;
> goto out_unmap_login_req_buf;
> }
Thanks.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-08-05 14:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 13:49 [PATCH] iser-target: Fix error return code in isert_alloc_login_buf() Wei Yongjun
2016-08-05 14:36 ` Leon Romanovsky [this message]
[not found] ` <20160805143609.GM27667-2ukJVAZIZ/Y@public.gmane.org>
2016-08-07 9:17 ` Sagi Grimberg
[not found] ` <1470404968-17339-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-07 12:20 ` [PATCH v2] iser-target: fix " Wei Yongjun
2016-08-07 13:08 ` Leon Romanovsky
2016-08-22 18:11 ` Doug Ledford
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=20160805143609.GM27667@leon.nu \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sagi@grimberg.me \
--cc=sean.hefty@intel.com \
--cc=target-devel@vger.kernel.org \
--cc=weiyj.lk@gmail.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