Skip to content

Commit

Permalink
thermal: rockchip: disable thermal->clk in err case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Lin authored and Eduardo Valentin committed May 17, 2016
1 parent 44cb6a7 commit ab5b52f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/thermal/rockchip_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ab5b52f

Please sign in to comment.