Commit 3501f0c6 authored by Satish Nagireddy's avatar Satish Nagireddy Committed by Wolfram Sang

i2c: cadence: Unregister the clk notifier in error path

This patch ensures that the clock notifier is unregistered
when driver probe is returning error.

Fixes: df8eb569 ("i2c: Add driver for Cadence I2C controller")
Signed-off-by: default avatarSatish Nagireddy <satish.nagireddy@getcruise.com>
Tested-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: default avatarMichal Simek <michal.simek@amd.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 8ad59b39
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment