From: Wei Yongjun <weiyj.lk@gmail.com>
To: Sagi Grimberg <sagi@grimberg.me>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: Wei Yongjun <weiyj.lk@gmail.com>,
linux-rdma@vger.kernel.org, target-devel@vger.kernel.org
Subject: [PATCH] iser-target: Fix error return code in isert_alloc_login_buf()
Date: Fri, 5 Aug 2016 13:49:28 +0000 [thread overview]
Message-ID: <1470404968-17339-1-git-send-email-weiyj.lk@gmail.com> (raw)
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");
+ ret = -ENOMEM;
goto out_unmap_login_req_buf;
}
next reply other threads:[~2016-08-05 13:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 13:49 Wei Yongjun [this message]
2016-08-05 14:36 ` [PATCH] iser-target: Fix error return code in isert_alloc_login_buf() Leon Romanovsky
[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=1470404968-17339-1-git-send-email-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--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 \
/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