i2c: cadence: Unregister the clk notifier in error path
[ Upstream commit3501f0c663
] This patch ensures that the clock notifier is unregistered when driver probe is returning error. Fixes:df8eb5691c
("i2c: Add driver for Cadence I2C controller") Signed-off-by: Satish Nagireddy <satish.nagireddy@getcruise.com> Tested-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Родитель
941d77b795
Коммит
530ee8d3c6
|
@ -1338,6 +1338,7 @@ static int cdns_i2c_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_clk_dis:
|
||||
clk_notifier_unregister(id->clk, &id->clk_rate_change_nb);
|
||||
clk_disable_unprepare(id->clk);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_set_suspended(&pdev->dev);
|
||||
|
|
Загрузка…
Ссылка в новой задаче