Skip to content

Commit

Permalink
ARM: perf: remove redundant NULL check on cpu_pmu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Will Deacon committed Jan 14, 2013
1 parent 3b953c9 commit 1764c59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/kernel/perf_event_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 1764c59

Please sign in to comment.