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

Commit 259bbc57 authored by Maor Gottlieb's avatar Maor Gottlieb Committed by Saeed Mahameed
Browse files

net/mlx5: Fix error handling in load one



We didn't store the result of mlx5_init_once, due to that
mlx5_load_one returned success on error.  Fix that.

Fixes: 59211bd3 ("net/mlx5: Split the load/unload flow into hardware and software flows")
Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 72f36be0
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1123,10 +1123,13 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,
		goto err_stop_poll;
	}

	if (boot && mlx5_init_once(dev, priv)) {
	if (boot) {
		err = mlx5_init_once(dev, priv);
		if (err) {
			dev_err(&pdev->dev, "sw objs init failed\n");
			goto err_stop_poll;
		}
	}

	err = mlx5_alloc_irq_vectors(dev);
	if (err) {