From: Shawn Lin Date: Mon, 18 Apr 2016 03:35:53 +0000 (+0800) Subject: FROMLIST: thermal: rockchip: disable thermal->clk in err case X-Git-Tag: firefly_0821_release~2789 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e90650e85bcfb1682d55e8f77adf786dd874f37b;p=firefly-linux-kernel-4.4.55.git FROMLIST: thermal: rockchip: disable thermal->clk in err case Disable thermal->clk when enabling pclk fails in resume routine. Change-Id: I7d8780be04891bf4cddf1ba970eae2a2f14ec7ac Signed-off-by: Shawn Lin Reviewed-by: Heiko Stuebner Reviewed-by: Caesar Wang Signed-off-by: Caesar Wang (am from https://patchwork.kernel.org/patch/8867151/) --- diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index dcd36db4e104..39e2eec57fff 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -1154,8 +1154,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);