aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 2b181f75da15..158709418e21 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -203,7 +203,7 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
203 struct cpufreq_policy *policy = NULL; 203 struct cpufreq_policy *policy = NULL;
204 unsigned long flags; 204 unsigned long flags;
205 205
206 if (cpufreq_disabled() || (cpu >= nr_cpu_ids)) 206 if (cpu >= nr_cpu_ids)
207 return NULL; 207 return NULL;
208 208
209 if (!down_read_trylock(&cpufreq_rwsem)) 209 if (!down_read_trylock(&cpufreq_rwsem))
@@ -230,9 +230,6 @@ EXPORT_SYMBOL_GPL(cpufreq_cpu_get);
230 230
231void cpufreq_cpu_put(struct cpufreq_policy *policy) 231void cpufreq_cpu_put(struct cpufreq_policy *policy)
232{ 232{
233 if (cpufreq_disabled())
234 return;
235
236 kobject_put(&policy->kobj); 233 kobject_put(&policy->kobj);
237 up_read(&cpufreq_rwsem); 234 up_read(&cpufreq_rwsem);
238} 235}