aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-07 12:20:38 +0000
committerDoug Ledford <dledford@redhat.com>2016-08-22 14:26:55 -0400
commit1d5840c971455ad4ecece3f72012961cac8d0f00 (patch)
tree2174be4fb8ce8c0be9ed45759469dbd274c42048 /drivers/infiniband/ulp
parentIB/core: Fix possible memory leak in cma_resolve_iboe_route() (diff)
downloadwireguard-linux-1d5840c971455ad4ecece3f72012961cac8d0f00.tar.xz
wireguard-linux-1d5840c971455ad4ecece3f72012961cac8d0f00.zip
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 <weiyj.lk@gmail.com> Acked-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-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;
}