Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98d03d9d authored by Yu Zhe's avatar Yu Zhe Committed by Greg Kroah-Hartman
Browse files

perf/arm_pmu_platform: fix tests for platform_get_irq() failure



[ Upstream commit 6bb0d64c100091e131cd16710b62fda3319cd0af ]

The platform_get_irq() returns negative error codes.  It can't actually
return zero.

Signed-off-by: default avatarYu Zhe <yuzhe@nfschina.com>
Link: https://lore.kernel.org/r/20220825011844.8536-1-yuzhe@nfschina.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0d830374
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,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);
	}