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

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
...@@ -1123,9 +1123,12 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv, ...@@ -1123,9 +1123,12 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,
goto err_stop_poll; goto err_stop_poll;
} }
if (boot && mlx5_init_once(dev, priv)) { if (boot) {
dev_err(&pdev->dev, "sw objs init failed\n"); err = mlx5_init_once(dev, priv);
goto err_stop_poll; if (err) {
dev_err(&pdev->dev, "sw objs init failed\n");
goto err_stop_poll;
}
} }
err = mlx5_alloc_irq_vectors(dev); err = mlx5_alloc_irq_vectors(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment