diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index a2dee4cedf41..2fd779eb1ed1 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -179,6 +179,10 @@ static void cpufreq_stats_free_table(unsigned int cpu) | |||
179 | static void cpufreq_stats_free_sysfs(unsigned int cpu) | 179 | static void cpufreq_stats_free_sysfs(unsigned int cpu) |
180 | { | 180 | { |
181 | struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); | 181 | struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); |
182 | |||
183 | if (!cpufreq_frequency_get_table(cpu)) | ||
184 | return; | ||
185 | |||
182 | if (policy && !policy_is_shared(policy)) { | 186 | if (policy && !policy_is_shared(policy)) { |
183 | pr_debug("%s: Free sysfs stat\n", __func__); | 187 | pr_debug("%s: Free sysfs stat\n", __func__); |
184 | sysfs_remove_group(&policy->kobj, &stats_attr_group); | 188 | sysfs_remove_group(&policy->kobj, &stats_attr_group); |