diff options
author | Shawn Lin <shawn.lin@rock-chips.com> | 2016-04-18 03:35:53 (GMT) |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2016-05-17 14:28:32 (GMT) |
commit | ab5b52f1606f3a83e541102adf5d50e7a9bfdef5 (patch) | |
tree | 8d82ef07e610c87bbf955b3334dac0eeba38567f /drivers/thermal | |
parent | 44cb6a7df13d3f6e663262e8c264a46cf84aa679 (diff) | |
download | linux-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 1dbd862..f4c4bcd 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); |