cpufreq: dt: Fix crash when cpu offline at low temperature

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic7d363581468990993369a999a7157e6bd10817e
This commit is contained in:
Finley Xiao 2024-09-03 16:58:23 +08:00 committed by Tao Huang
parent 7b36fddab7
commit 300db31c73

View file

@ -160,12 +160,18 @@ out_clk_put:
static int cpufreq_online(struct cpufreq_policy *policy)
{
#ifdef CONFIG_ARCH_ROCKCHIP
return rockchip_cpufreq_online(policy->cpu);
#endif
/* We did light-weight tear down earlier, nothing to do here */
return 0;
}
static int cpufreq_offline(struct cpufreq_policy *policy)
{
#ifdef CONFIG_ARCH_ROCKCHIP
return rockchip_cpufreq_offline(policy->cpu);
#endif
/*
* Preserve policy->driver_data and don't free resources on light-weight
* tear down.