aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <[email protected]>2016-08-07 12:20:38 +0000
committerDoug Ledford <[email protected]>2016-08-22 14:26:55 -0400
commit1d5840c971455ad4ecece3f72012961cac8d0f00 (patch)
tree2174be4fb8ce8c0be9ed45759469dbd274c42048
parent23d70503ee187819a3775c7ac73f17c5bfe3fad0 (diff)
IB/isert: fix error return code in isert_alloc_login_buf()
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 <[email protected]> Acked-by: Sagi Grimberg <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index ba6be060a476..7914c14478cd 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -448,7 +448,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;
}