Re: [PATCH for-next v14 02/10] RDMA/rxe: Add rxe_srq_cleanup()

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

 



On Wed, Apr 20, 2022 at 08:40:35PM -0500, Bob Pearson wrote:
> index 2ddfd99dd020..30491b976d39 100644
> +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
> @@ -286,36 +286,35 @@ static int rxe_create_srq(struct ib_srq *ibsrq, struct ib_srq_init_attr *init,
>  	struct rxe_srq *srq = to_rsrq(ibsrq);
>  	struct rxe_create_srq_resp __user *uresp = NULL;
>  
> -	if (init->srq_type != IB_SRQT_BASIC)
> -		return -EOPNOTSUPP;
> -
>  	if (udata) {
>  		if (udata->outlen < sizeof(*uresp))
>  			return -EINVAL;
>  		uresp = udata->outbuf;
>  	}
>  
> +	if (init->srq_type != IB_SRQT_BASIC)
> +		return -EOPNOTSUPP;
> +
>  	err = rxe_srq_chk_init(rxe, init);
>  	if (err)
> -		goto err1;
> +		goto err_out;

Just write 'return err' in cases like this, no need for a goto return

Jason



[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