From: Will Deacon Date: Mon, 14 Jan 2013 17:27:35 +0000 (+0000) Subject: ARM: perf: remove redundant NULL check on cpu_pmu X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=1764c591dfed2ce7075465df0591ce9564ff37a1;p=deliverable%2Flinux.git 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 Signed-off-by: Will Deacon --- diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index efa52954d628..43496f600569 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c @@ -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); }