thermal: rockchip: disable thermal->clk in err case
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 18 Apr 2016 03:35:53 +0000 (11:35 +0800)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 17 May 2016 14:28:32 +0000 (07:28 -0700)
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>
drivers/thermal/rockchip_thermal.c

index 1dbd862..f4c4bcd 100644 (file)
@@ -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);