From: Shawn Lin Date: Mon, 18 Apr 2016 03:35:53 +0000 (+0800) Subject: thermal: rockchip: disable thermal->clk in err case X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=ab5b52f1606f3a83e541102adf5d50e7a9bfdef5;p=deliverable%2Flinux.git 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 --- 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);