From ab5b52f1606f3a83e541102adf5d50e7a9bfdef5 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Mon, 18 Apr 2016 11:35:53 +0800 Subject: thermal: rockchip: disable thermal->clk in err case Disable thermal->clk when enabling pclk fails in resume routine. Signed-off-by: Shawn Lin Reviewed-by: Heiko Stuebner Reviewed-by: Caesar Wang Signed-off-by: Caesar Wang Signed-off-by: Eduardo Valentin --- drivers/thermal/rockchip_thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/thermal/rockchip_thermal.c') 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); -- cgit v1.2.3-55-g7522