summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/rockchip_thermal.c
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-04-18 05:35:53 +0200
committerEduardo Valentin <edubezval@gmail.com>2016-05-17 16:28:32 +0200
commitab5b52f1606f3a83e541102adf5d50e7a9bfdef5 (patch)
tree8d82ef07e610c87bbf955b3334dac0eeba38567f /drivers/thermal/rockchip_thermal.c
parentthermal: tegra: add Tegra132 specific SOC_THERM driver (diff)
downloadlinux-ab5b52f1606f3a83e541102adf5d50e7a9bfdef5.tar.xz
linux-ab5b52f1606f3a83e541102adf5d50e7a9bfdef5.zip
thermal: rockchip: disable thermal->clk in err case
Disable thermal->clk when enabling pclk fails in resume routine. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/rockchip_thermal.c')
-rw-r--r--drivers/thermal/rockchip_thermal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index 1dbd8623c309..f4c4bcd7c6e4 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -979,8 +979,10 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
return error;
error = clk_enable(thermal->pclk);
- if (error)
+ if (error) {
+ clk_disable(thermal->clk);
return error;
+ }
rockchip_thermal_reset_controller(thermal->reset);