diff options
author | Yu Zhe <yuzhe@nfschina.com> | 2022-08-25 04:18:44 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2022-09-01 14:01:40 +0300 |
commit | 6bb0d64c100091e131cd16710b62fda3319cd0af (patch) | |
tree | c55f57c1d909ffbdebfe02d37af34888aaaac8a3 /drivers/perf | |
parent | e62b9e6f25fc99be07c3b7b284262ee74ed645a9 (diff) | |
download | linux-6bb0d64c100091e131cd16710b62fda3319cd0af.tar.xz |
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.c | 2 |
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); } |