Subject: Re: [PATCH net-next] net/mlx5e: fix error return code in mlx5e_alloc_rq()

From: Jesper Dangaard Brouer <[email-masked]>
Date: Wed, 10 Jan 2018 15:08:12 +0100

On Wed, 10 Jan 2018 07:30:53 +0000 Wei Yongjun <[email-masked]> wrote:

> Fix to return a negative error code from the xdp_rxq_info_reg() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 0ddf543226ac ("xdp/mlx5: setup xdp_rxq_info")
> Signed-off-by: Wei Yongjun <[email-masked]>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 539bd1d..6ba6671 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -582,7 +582,8 @@ static int mlx5e_alloc_rq(struct mlx5e_channel *c,
>  		goto err_rq_wq_destroy;
>  	}
>  
> -	if (xdp_rxq_info_reg(&rq->xdp_rxq, rq->netdev, rq->ix) < 0)
> +	err = xdp_rxq_info_reg(&rq->xdp_rxq, rq->netdev, rq->ix);
> +	if (err < 0)
>  		goto err_rq_wq_destroy;
>  
>  	rq->buff.map_dir = rq->xdp_prog ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE;

Reviewed-by: Jesper Dangaard Brouer <[email-masked]>

Thanks for fixing this.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer