cpufreq: stats: Don't update cpufreq_stats_table if it's NULL
When cpufreq_stats_table is not initialized for policy->last_cpu in CPUFREQ_UPDATE_POLICY_CPU callback, no updates are necessary. Current implementation dereferences the table unconditionally, causing a crash if the table is NULL. Return directly in cpufreq_stats_update_policy_cpu() if cpufreq_stats_table of policy->last_cpu is NULL. Change-Id: Ic9ef8120557702791ba5b873532e47cc0a5dc027 Signed-off-by:Junjie Wu <junjiew@codeaurora.org> Signed-off-by:
franciscofranco <franciscofranco.1990@gmail.com>
Loading
Please register or sign in to comment