Skip to content

Commit 1764c59

Browse files
committed
ARM: perf: remove redundant NULL check on cpu_pmu
cpu_pmu has already been dereferenced before we consider invoking the ->reset function, so remove the redundant NULL check. Reported-by: Cong Ding <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 3b953c9 commit 1764c59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/kernel/perf_event_cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static void cpu_pmu_init(struct arm_pmu *cpu_pmu)
147147
cpu_pmu->free_irq = cpu_pmu_free_irq;
148148

149149
/* Ensure the PMU has sane values out of reset. */
150-
if (cpu_pmu && cpu_pmu->reset)
150+
if (cpu_pmu->reset)
151151
on_each_cpu(cpu_pmu->reset, cpu_pmu, 1);
152152
}
153153

0 commit comments

Comments
 (0)