Skip to content

Commit 6bb0d64

Browse files
yuzhenfschinawilldeacon
authored andcommitted
perf/arm_pmu_platform: fix tests for platform_get_irq() failure
The platform_get_irq() returns negative error codes. It can't actually return zero. Signed-off-by: Yu Zhe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent e62b9e6 commit 6bb0d64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/perf/arm_pmu_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int pmu_parse_irqs(struct arm_pmu *pmu)
117117

118118
if (num_irqs == 1) {
119119
int irq = platform_get_irq(pdev, 0);
120-
if (irq && irq_is_percpu_devid(irq))
120+
if ((irq > 0) && irq_is_percpu_devid(irq))
121121
return pmu_parse_percpu_irq(pmu, irq);
122122
}
123123

0 commit comments

Comments
 (0)