1
0
Fork 0

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: 59211bd3b6 ("net/mlx5: Split the load/unload flow into hardware and software flows")
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
hifive-unleashed-5.1
Maor Gottlieb 2017-12-31 11:31:34 +02:00 committed by Saeed Mahameed
parent 72f36be061
commit 259bbc575c
1 changed files with 6 additions and 3 deletions

View File

@ -1123,9 +1123,12 @@ 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)) {
dev_err(&pdev->dev, "sw objs init failed\n");
goto err_stop_poll;
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);