All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iser-target: Fix error return code in isert_alloc_login_buf()
@ 2016-08-05 13:49 Wei Yongjun
  2016-08-05 14:36 ` Leon Romanovsky
       [not found] ` <1470404968-17339-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Wei Yongjun @ 2016-08-05 13:49 UTC (permalink / raw)
  To: Sagi Grimberg, Doug Ledford, Sean Hefty, Hal Rosenstock
  Cc: Wei Yongjun, linux-rdma, target-devel

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;
 	}

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-22 18:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
     [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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.