From: Gal Pressman Date: Mon, 19 Jun 2017 15:25:59 +0000 (+0300) Subject: net/mlx5: Fix driver load error flow when firmware is stuck X-Git-Tag: v4.13-rc1~157^2~17^2^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8ce59b16b4b6eacedaec1f7b652b4781cdbfe15f;p=karo-tx-linux.git net/mlx5: Fix driver load error flow when firmware is stuck 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 Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 13be264587f1..fd47b5134841 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -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);