Re: [PATCH] iser-target: Fix error return code in isert_alloc_login_buf()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 05, 2016 at 01:49:28PM +0000, Wei Yongjun wrote:
> 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@xxxxxxxxx>
> ---
>  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");

Please remove the line above too.
There is no chance to miss kzalloc allocation failure.

> +		ret = -ENOMEM;
>  		goto out_unmap_login_req_buf;
>  	}

Thanks.

> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux