[PATCH] thermal: rockchip: disable thermal->clk in err case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ,

Sorry for the missing it.

? 2016?02?15? 10:27, Shawn Lin ??:
> Disable thermal->clk when enabling pclk fails in
> resume routine.
>
> Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>

Reviewed-by: Caesar Wang <wxt at rock-chips.com>

> ---
>
>   drivers/thermal/rockchip_thermal.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
> index 9787e8a..b54f6db 100644
> --- a/drivers/thermal/rockchip_thermal.c
> +++ b/drivers/thermal/rockchip_thermal.c
> @@ -656,8 +656,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);
>   


-- 
Thanks,
Caesar




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux