]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net/mlx5: Fix driver load bad flow when having fw initializing timeout
authorMohamad Haj Yahia <mohamad@mellanox.com>
Thu, 30 Mar 2017 14:00:25 +0000 (17:00 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 22 Apr 2017 18:52:37 +0000 (21:52 +0300)
If FW is stuck in initializing state we will skip the driver load, but
current error handling flow doesn't clean previously allocated command
interface resources.

Fixes: e3297246c2c8 ('net/mlx5_core: Wait for FW readiness on startup')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index 60154a175bd3866f2b461a357c60d86283afde12..0ad66324247f71c212f44f98679c80f05a2650d3 100644 (file)
@@ -1029,7 +1029,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,
        if (err) {
                dev_err(&dev->pdev->dev, "Firmware over %d MS in initializing state, aborting\n",
                        FW_INIT_TIMEOUT_MILI);
-               goto out_err;
+               goto err_cmd_cleanup;
        }
 
        err = mlx5_core_enable_hca(dev, 0);