summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-01-10 07:30:53 +0000
committerDavid S. Miller <davem@davemloft.net>2018-01-10 15:54:36 -0500
commite213f5b6dd5d1a7ab6a5d11c851916e25fac7e49 (patch)
tree3c456694018ede302a459b03113fae2f41f5504d /drivers/net/ethernet/mellanox
parentea0a42109aee7b92e631c4eb3f2219fadf58acdd (diff)
downloadlinux-e213f5b6dd5d1a7ab6a5d11c851916e25fac7e49.tar.bz2
net/mlx5e: fix error return code in mlx5e_alloc_rq()
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 <weiyongjun1@huawei.com> Reviewed-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index a5f82bbfa7dc..bbbdb5c0086b 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;