mlx5e: Correct order of closing qs on error
PATCH 1/1 mlx5e: Correct order of closing qs on error
When attempting to open queues for a channel, on error the goto for mlx5e_open_rq and mlx5e_open_xdpsq are inverted. This could lead to a q not being correctly closed.
Signed-off-by Kev Jackson <[email protected]>
--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +5 -5
@@ -1858,21 +1858,21 @@ static int mlx5e_open_queues(struct mlx5e_channel *c, err =mlx5e_open_rq (c, params, &cparam->rq,NULL ,NULL , &c->rq);if (err) - goto err_close_xdp_sq; + goto err_close_rq; err =mlx5e_open_xdpsq (c, params, &cparam->xdp_sq,NULL , &c->xdpsq, true);if (err) - goto err_close_rq; + goto err_close_xdp_sq;return 0 ; -err_close_rq: -mlx5e_close_rq (&c->rq); - err_close_xdp_sq:if (c->xdp)mlx5e_close_xdpsq (&c->rq_xdpsq); +err_close_rq: +mlx5e_close_rq (&c->rq); + err_close_sqs:mlx5e_close_sqs (c);
Signature · 1 line
2.30.2