diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index a89a0a869a54..e56f550d788b 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -235,7 +235,7 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) struct cpufreq_policy *policy = NULL; unsigned long flags; - if (WARN_ON(cpu >= nr_cpu_ids)) + if (cpu >= nr_cpu_ids) return NULL; /* get the cpufreq driver */