summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-10-11 12:16:33 +0300
committerHans de Goede <hdegoede@redhat.com>2023-10-11 12:16:33 +0300
commita4fdebbe062c0da3284e79641c2d5e67150f0daf (patch)
tree927c293318eb1e1a342623d0a3a366b4f4e2f119 /drivers/platform
parent5b44abbc39ca15df80d0da4756078c98c831090f (diff)
parent7ec4cd3c1a12dc08c60d5e376c2c05aae23f1e41 (diff)
downloadlinux-a4fdebbe062c0da3284e79641c2d5e67150f0daf.tar.xz
Merge tag 'platform-drivers-x86-mellanox-init-v6.6' into fixes
Fixes in the mellanox init branch due for v6.6. platform-drivers-x86-mellanox-init-v6.6: v6.6-rc1 + fixes in the platform-drivers-x86-mellanox-init branch to avoid a feature conflict during the v6.7 merge window.
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/mlx-platform.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 3d96dbf79a72..a2ffe4157df1 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -6514,6 +6514,7 @@ static int mlxplat_i2c_main_init(struct mlxplat_priv *priv)
return 0;
fail_mlxplat_i2c_mux_topology_init:
+ platform_device_unregister(priv->pdev_i2c);
fail_platform_i2c_register:
fail_mlxplat_mlxcpld_verify_bus_topology:
return err;
@@ -6521,6 +6522,7 @@ fail_mlxplat_mlxcpld_verify_bus_topology:
static void mlxplat_i2c_main_exit(struct mlxplat_priv *priv)
{
+ mlxplat_pre_exit(priv);
mlxplat_i2c_mux_topology_exit(priv);
if (priv->pdev_i2c)
platform_device_unregister(priv->pdev_i2c);
@@ -6597,7 +6599,7 @@ static int mlxplat_probe(struct platform_device *pdev)
fail_register_reboot_notifier:
fail_regcache_sync:
- mlxplat_pre_exit(priv);
+ mlxplat_i2c_main_exit(priv);
fail_mlxplat_i2c_main_init:
fail_regmap_write:
fail_alloc:
@@ -6614,7 +6616,6 @@ static int mlxplat_remove(struct platform_device *pdev)
pm_power_off = NULL;
if (mlxplat_reboot_nb)
unregister_reboot_notifier(mlxplat_reboot_nb);
- mlxplat_pre_exit(priv);
mlxplat_i2c_main_exit(priv);
mlxplat_post_exit();
return 0;