aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-04-17 23:35:53 -0400
committerEduardo Valentin <edubezval@gmail.com>2016-05-17 10:28:32 -0400
commitab5b52f1606f3a83e541102adf5d50e7a9bfdef5 (patch)
tree8d82ef07e610c87bbf955b3334dac0eeba38567f
parent44cb6a7df13d3f6e663262e8c264a46cf84aa679 (diff)
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>
-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)
979 return error; 979 return error;
980 980
981 error = clk_enable(thermal->pclk); 981 error = clk_enable(thermal->pclk);
982 if (error) 982 if (error) {
983 clk_disable(thermal->clk);
983 return error; 984 return error;
985 }
984 986
985 rockchip_thermal_reset_controller(thermal->reset); 987 rockchip_thermal_reset_controller(thermal->reset);
986 988