Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ec0bb22 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

net/mlx5_core: fix an error code



We return success if mlx5e_alloc_sq_db() fails but we should return an
error code.

Fixes: f62b8bb8 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f60a8b3d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -525,7 +525,8 @@ static int mlx5e_create_sq(struct mlx5e_channel *c,
	sq->uar_map     = sq->uar.map;
	sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2;

	if (mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu)))
	err = mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu));
	if (err)
		goto err_sq_wq_destroy;

	sq->txq = netdev_get_tx_queue(priv->netdev,