[PATCH 1/4] base/drivers/arch_topology: Remove useless check

From: Daniel Lezcano
Date: Mon Oct 29 2018 - 12:23:41 EST


The function 'register_cpufreq_notifier' registers the
init_cpu_capacity_notifier() only if raw_capacity is not NULL.

Hence init_cpu_capacity_notifier() can not be called with raw_capacity
set to NULL, it is pointless to check it.

Remove the check.

Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
---
drivers/base/arch_topology.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index e7cb0c6..204ed10 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -181,9 +181,6 @@ init_cpu_capacity_callback(struct notifier_block *nb,
struct cpufreq_policy *policy = data;
int cpu;

- if (!raw_capacity)
- return 0;
-
if (val != CPUFREQ_NOTIFY)
return 0;

--
2.7.4