ARM: perf: remove redundant NULL check on cpu_pmu
authorWill Deacon <will.deacon@arm.com>
Mon, 14 Jan 2013 17:27:35 +0000 (17:27 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 14 Jan 2013 17:40:38 +0000 (17:40 +0000)
cpu_pmu has already been dereferenced before we consider invoking the
->reset function, so remove the redundant NULL check.

Reported-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/perf_event_cpu.c

index efa52954d62822b7908f173eb1a1756deca53287..43496f600569f1a83bfd62cdbc4c9c64d20cb856 100644 (file)
@@ -147,7 +147,7 @@ static void cpu_pmu_init(struct arm_pmu *cpu_pmu)
        cpu_pmu->free_irq       = cpu_pmu_free_irq;
 
        /* Ensure the PMU has sane values out of reset. */
-       if (cpu_pmu && cpu_pmu->reset)
+       if (cpu_pmu->reset)
                on_each_cpu(cpu_pmu->reset, cpu_pmu, 1);
 }