Commit 6bf56076 authored by Dan Carpenter's avatar Dan Carpenter Committed by Chanwoo Choi

PM / devfreq: tegra30: Disable clock on error in probe

This error path needs to call clk_disable_unprepare().

Fixes: 7296443b ("PM / devfreq: tegra30: Handle possible round-rate error")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 0c309ed1
......@@ -836,7 +836,8 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
rate = clk_round_rate(tegra->emc_clock, ULONG_MAX);
if (rate < 0) {
dev_err(&pdev->dev, "Failed to round clock rate: %ld\n", rate);
return rate;
err = rate;
goto disable_clk;
}
tegra->max_freq = rate / KHZ;
......@@ -897,6 +898,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
dev_pm_opp_remove_all_dynamic(&pdev->dev);
reset_control_reset(tegra->reset);
disable_clk:
clk_disable_unprepare(tegra->clock);
return err;
......
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