From 3ddc64a88c21ec7090f6ad821a78be1e7b576044 Mon Sep 17 00:00:00 2001 From: mawrick26 Date: Sat, 27 Feb 2021 15:48:02 +0100 Subject: [PATCH] cpufreq: Don't WARN_ON on non-existent cpu Change-Id: I740ca7c1faaaa04560c65637f087af64f932280b Signed-off-by: mawrick26 Signed-off-by: Richard Raya --- 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 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 */