提交 6bb0d64c 编写于 作者: Y Yu Zhe 提交者: Will Deacon

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: NYu Zhe <yuzhe@nfschina.com>
Link: https://lore.kernel.org/r/20220825011844.8536-1-yuzhe@nfschina.comSigned-off-by: NWill Deacon <will@kernel.org>
上级 e62b9e6f
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册