aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/perf
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2018-07-04 11:50:50 +0100
committerWill Deacon <will.deacon@arm.com>2018-07-04 11:50:50 +0100
commit59b62e7ad0874681dc4f84cac90cc991dc265809 (patch)
tree8d5e44ce03a3d54e8c709c288a9f3a676041db2e /drivers/perf
parentperf/arm-cci: Remove VLA usage (diff)
downloadlinux-dev-59b62e7ad0874681dc4f84cac90cc991dc265809.tar.xz
linux-dev-59b62e7ad0874681dc4f84cac90cc991dc265809.zip
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: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/perf')
-rw-r--r--drivers/perf/arm_pmu_platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c
index 971ff336494a..96075cecb0ae 100644
--- a/drivers/perf/arm_pmu_platform.c
+++ b/drivers/perf/arm_pmu_platform.c
@@ -160,7 +160,7 @@ static int pmu_parse_irqs(struct arm_pmu *pmu)
static int armpmu_request_irqs(struct arm_pmu *armpmu)
{
struct pmu_hw_events __percpu *hw_events = armpmu->hw_events;
- int cpu, err;
+ int cpu, err = 0;
for_each_cpu(cpu, &armpmu->supported_cpus) {
int irq = per_cpu(hw_events->irq, cpu);