diff mbox

[15/17] cpufreq: don't check if cpu > nr_cpu_ids

Message ID 9c5002262cb37915c7aa117814831a9017bda2db.1420181916.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Jan. 2, 2015, 7:04 a.m. UTC
I don't know for what kind of callers do we have this check for. The problem is
that such checks introduce an unnecessary delay for the good users.

So, I am dropping it for now, let me know if this is a bad change.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 09426671eb79..14d637a28dd8 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -202,7 +202,7 @@  struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
 	struct cpufreq_policy *policy = NULL;
 	unsigned long flags;
 
-	if (cpufreq_disabled() || (cpu >= nr_cpu_ids))
+	if (cpufreq_disabled())
 		return NULL;
 
 	if (!down_read_trylock(&cpufreq_rwsem))