clk: tegra: tegra124-emc: Fix clock imbalance in emc_set_timing()
After calling clk_prepare_enable(), clk_disable_unprepare() needs be called when prepare_timing_change() failed. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Родитель
e848edae31
Коммит
f13570e7e8
|
@ -249,8 +249,10 @@ static int emc_set_timing(struct tegra_clk_emc *tegra,
|
|||
div = timing->parent_rate / (timing->rate / 2) - 2;
|
||||
|
||||
err = tegra->prepare_timing_change(emc, timing->rate);
|
||||
if (err)
|
||||
if (err) {
|
||||
clk_disable_unprepare(timing->parent);
|
||||
return err;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(tegra->lock, flags);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче