From: Wei Yongjun Date: Sun, 7 Aug 2016 12:20:38 +0000 (+0000) Subject: IB/isert: fix error return code in isert_alloc_login_buf() X-Git-Tag: v4.8-rc4~9^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d5840c971455ad4ecece3f72012961cac8d0f00;p=platform%2Fkernel%2Flinux-exynos.git 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 Acked-by: Sagi Grimberg Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index ba6be06..7914c14 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; }