ARM: topology: remove unneeded check for /cpus node
authorRob Herring <robh@kernel.org>
Mon, 27 Aug 2018 15:59:05 +0000 (10:59 -0500)
committerRob Herring <robh@kernel.org>
Fri, 28 Sep 2018 19:25:58 +0000 (14:25 -0500)
Checking for "/cpus" node is not necessary as of_get_cpu_node() will fail
later on anyways. The call to of_find_node_by_path() also leaks a
reference. So just remove the check.

Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
arch/arm/kernel/topology.c

index 24ac3cab411d94a186390aa1fedb16b53e1d3a73..60e375ce1ab2c4f5ad9c773951c4e068f72f2c1b 100644 (file)
@@ -94,12 +94,6 @@ static void __init parse_dt_topology(void)
        __cpu_capacity = kcalloc(nr_cpu_ids, sizeof(*__cpu_capacity),
                                 GFP_NOWAIT);
 
-       cn = of_find_node_by_path("/cpus");
-       if (!cn) {
-               pr_err("No CPU information found in DT\n");
-               return;
-       }
-
        for_each_possible_cpu(cpu) {
                const u32 *rate;
                int len;