From 7146c56d699c1b46d4d118bba74c261ca880fe39 Mon Sep 17 00:00:00 2001 From: mawrick26 Date: Wed, 12 May 2021 16:19:09 +0200 Subject: [PATCH] cpufreq: Don't WARN_ON on non-existent cpu Signed-off-by: mawrick26 --- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index f209e8e86a04..bb0cd3dd1f0b 100755 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -246,7 +246,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 */