2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

i2c: cadence: Move reset_control_assert after pm_runtime_set_suspended in probe error path

Ensure reset_control_assert() is called after pm_runtime_set_suspended()
in the cdns_i2c_probe exit path to maintain proper power management
sequence in error cases.

Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@amd.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250206115708.1085523-3-manikanta.guntupalli@amd.com
This commit is contained in:
Manikanta Guntupalli 2025-02-06 17:27:08 +05:30 committed by Andi Shyti
parent 3d36dd1161
commit 61b804548e

View File

@ -1609,9 +1609,9 @@ static int cdns_i2c_probe(struct platform_device *pdev)
err_clk_notifier_unregister: err_clk_notifier_unregister:
clk_notifier_unregister(id->clk, &id->clk_rate_change_nb); clk_notifier_unregister(id->clk, &id->clk_rate_change_nb);
reset_control_assert(id->reset);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev); pm_runtime_set_suspended(&pdev->dev);
reset_control_assert(id->reset);
return ret; return ret;
} }