summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-04-18 06:35:53 +0300
committerEduardo Valentin <edubezval@gmail.com>2016-05-17 17:28:32 +0300
commitab5b52f1606f3a83e541102adf5d50e7a9bfdef5 (patch)
tree8d82ef07e610c87bbf955b3334dac0eeba38567f /drivers/thermal
parent44cb6a7df13d3f6e663262e8c264a46cf84aa679 (diff)
downloadlinux-ab5b52f1606f3a83e541102adf5d50e7a9bfdef5.tar.xz
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')
-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);