]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2020 06:22:52 +0000 (08:22 +0200)
commit9f03225d18e217d01282995b5b264f1704272b54
tree9e0dbe0b93eb1be4bd632abd338bc0ac865dd951
parentd0b6c29f2f2d9fe275e54ad72c27536b011c9dd7
net/mlx5: Fix error flow in case of function_setup failure

[ Upstream commit 4f7400d5cbaef676e00cdffb0565bf731c6bb09e ]

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: e161105e58da ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/main.c