瀏覽代碼

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>
Shawn Lin 9 年之前
父節點
當前提交
ab5b52f160
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/thermal/rockchip_thermal.c

+ 3 - 1
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);