]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix error flow in case of function_setup failure
authorShay Drory <shayd@mellanox.com>
Wed, 6 May 2020 11:52:04 +0000 (14:52 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 23 May 2020 00:28:58 +0000 (17:28 -0700)
commit9e6b8a646541d8667156462dd6dc187aad8fb6ff
treeed5d29c9ed8eac34652aa96e5097ea5d5daf621a
parentfba3e5bba91eed0e684b2b367ff77166f8a66bd9
net/mlx5: Fix error flow in case of function_setup failure

Currently, if an error occurred during mlx5_function_setup(), we
keep dev->state as DEVICE_STATE_UP.
Fixing it by adding a goto label.

Fixes: 9394a3e1352b ("net/mlx5: Function setup/teardown procedures")
Signed-off-by: Shay Drory <shayd@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c