Commit 59b62e7a authored by Will Deacon's avatar Will Deacon

drivers/perf: Initialise return value in armpmu_request_irqs()

If a PMU doesn't have any IRQs, we should return 0 from
armpmu_request_irqs(), rather than uninitialised stack.
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 1201a5a2
...@@ -160,7 +160,7 @@ static int pmu_parse_irqs(struct arm_pmu *pmu) ...@@ -160,7 +160,7 @@ static int pmu_parse_irqs(struct arm_pmu *pmu)
static int armpmu_request_irqs(struct arm_pmu *armpmu) static int armpmu_request_irqs(struct arm_pmu *armpmu)
{ {
struct pmu_hw_events __percpu *hw_events = armpmu->hw_events; struct pmu_hw_events __percpu *hw_events = armpmu->hw_events;
int cpu, err; int cpu, err = 0;
for_each_cpu(cpu, &armpmu->supported_cpus) { for_each_cpu(cpu, &armpmu->supported_cpus) {
int irq = per_cpu(hw_events->irq, cpu); int irq = per_cpu(hw_events->irq, cpu);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment