thermal: rockchip: disable thermal->clk in err case

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>
This commit is contained in:
Shawn Lin 2016-04-18 11:35:53 +08:00 committed by Eduardo Valentin
parent 44cb6a7df1
commit ab5b52f160
1 changed files with 3 additions and 1 deletions

View File

@ -979,8 +979,10 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
return error; return error;
error = clk_enable(thermal->pclk); error = clk_enable(thermal->pclk);
if (error) if (error) {
clk_disable(thermal->clk);
return error; return error;
}
rockchip_thermal_reset_controller(thermal->reset); rockchip_thermal_reset_controller(thermal->reset);