[PATCH -next] PM / devfreq: tegra30: Add missing clk_disable_unprepare in devm_tegra_devfreq_init_hw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add the missing clk_disable_unprepare() before return in
devm_tegra_devfreq_init_hw().

Signed-off-by: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
---
 drivers/devfreq/tegra30-devfreq.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
index 4a4f0106ab9d..c19f8848d217 100644
--- a/drivers/devfreq/tegra30-devfreq.c
+++ b/drivers/devfreq/tegra30-devfreq.c
@@ -809,12 +809,15 @@ static int devm_tegra_devfreq_init_hw(struct device *dev,
 
 	err = devm_add_action_or_reset(dev, devm_tegra_devfreq_deinit_hw,
 				       tegra);
-	if (err)
+	if (err) {
+		clk_disable_unprepare(tegra->clock);
 		return err;
+	}
 
 	err = reset_control_reset(tegra->reset);
 	if (err) {
 		dev_err(dev, "Failed to reset hardware: %d\n", err);
+		clk_disable_unprepare(tegra->clock);
 		return err;
 	}
 
-- 
2.25.1





[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux