summaryrefslogtreecommitdiff
path: root/drivers/perf
diff options
context:
space:
mode:
authorYu Zhe <yuzhe@nfschina.com>2022-08-25 09:18:44 +0800
committerWill Deacon <will@kernel.org>2022-09-01 12:01:40 +0100
commit6bb0d64c100091e131cd16710b62fda3319cd0af (patch)
treec55f57c1d909ffbdebfe02d37af34888aaaac8a3 /drivers/perf
parente62b9e6f25fc99be07c3b7b284262ee74ed645a9 (diff)
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 <yuzhe@nfschina.com> Link: https://lore.kernel.org/r/20220825011844.8536-1-yuzhe@nfschina.com Signed-off-by: Will Deacon <will@kernel.org>
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 513de1f54e2d..933b96e243b8 100644
--- a/drivers/perf/arm_pmu_platform.c
+++ b/drivers/perf/arm_pmu_platform.c
@@ -117,7 +117,7 @@ static int pmu_parse_irqs(struct arm_pmu *pmu)
if (num_irqs == 1) {
int irq = platform_get_irq(pdev, 0);
- if (irq && irq_is_percpu_devid(irq))
+ if ((irq > 0) && irq_is_percpu_devid(irq))
return pmu_parse_percpu_irq(pmu, irq);
}