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-Tag: v3.9-rc1~8^2~5^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1764c591dfed2ce7075465df0591ce9564ff37a1;p=profile%2Fcommon%2Fkernel-common.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 efa5295..43496f6 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); }