From: Shawn Lin Date: Mon, 18 Apr 2016 03:35:53 +0000 (+0800) Subject: thermal: rockchip: disable thermal->clk in err case X-Git-Tag: v4.14-rc1~3135^2^3~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab5b52f1606f3a83e541102adf5d50e7a9bfdef5;p=platform%2Fkernel%2Flinux-rpi.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 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);