|
@@ -179,6 +179,10 @@ static void cpufreq_stats_free_table(unsigned int cpu)
|
|
|
static void cpufreq_stats_free_sysfs(unsigned int cpu)
|
|
|
{
|
|
|
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
|
|
|
+
|
|
|
+ if (!cpufreq_frequency_get_table(cpu))
|
|
|
+ return;
|
|
|
+
|
|
|
if (policy && !policy_is_shared(policy)) {
|
|
|
pr_debug("%s: Free sysfs stat\n", __func__);
|
|
|
sysfs_remove_group(&policy->kobj, &stats_attr_group);
|