From: Mohamad Haj Yahia Date: Thu, 30 Mar 2017 14:00:25 +0000 (+0300) Subject: net/mlx5: Fix driver load bad flow when having fw initializing timeout X-Git-Tag: v4.10.14~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82aa6b2c1f19477c2c8911b80617e76856204a42;p=thirdparty%2Fkernel%2Fstable.git net/mlx5: Fix driver load bad flow when having fw initializing timeout [ Upstream commit 55378a238e04b39cc82957d91d16499704ea719b ] 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 Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 4aca265d9c147..4ee7ea775a023 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -1001,7 +1001,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);