net/mlx5: Fix driver load error flow when firmware is stuck
authorGal Pressman <galp@mellanox.com>
Mon, 19 Jun 2017 15:25:59 +0000 (18:25 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 27 Jun 2017 11:49:57 +0000 (14:49 +0300)
When wait for firmware init fails, previous code would mistakenly
return success and cause inconsistency in the driver state.

Fixes: 6c780a0267b8 ("net/mlx5: Wait for FW readiness before initializing command interface")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index 13be264587f135737887688005ed7ba872b54157..fd47b51348418f2d27ae6d55c0e29dfb060363c1 100644 (file)
@@ -1020,7 +1020,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 pre-initializing state, aborting\n",
                        FW_PRE_INIT_TIMEOUT_MILI);
-               goto out;
+               goto out_err;
        }
 
        err = mlx5_cmd_init(dev);