[irqchip: irq/irqchip-next] irqchip/irq-pruss-intc: Do not check for 0 return after calling platform_get_irq()

From: irqchip-bot for Ruan Jinjie
Date: Mon Aug 21 2023 - 12:58:24 EST


The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID: d0afed833970808f141ed52fcc591998087f3a26
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/d0afed833970808f141ed52fcc591998087f3a26
Author: Ruan Jinjie <ruanjinjie@xxxxxxxxxx>
AuthorDate: Thu, 03 Aug 2023 16:34:52 +08:00
Committer: Marc Zyngier <maz@xxxxxxxxxx>
CommitterDate: Mon, 21 Aug 2023 17:42:00 +01:00

irqchip/irq-pruss-intc: Do not check for 0 return after calling platform_get_irq()

It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().

Signed-off-by: Ruan Jinjie <ruanjinjie@xxxxxxxxxx>
Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20230803083452.4085650-3-ruanjinjie@xxxxxxxxxx
---
drivers/irqchip/irq-pruss-intc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index fa8d89b..ee69e8d 100644
--- a/drivers/irqchip/irq-pruss-intc.c
+++ b/drivers/irqchip/irq-pruss-intc.c
@@ -565,8 +565,8 @@ static int pruss_intc_probe(struct platform_device *pdev)
continue;

irq = platform_get_irq_byname(pdev, irq_names[i]);
- if (irq <= 0) {
- ret = (irq == 0) ? -EINVAL : irq;
+ if (irq < 0) {
+ ret = irq;
goto fail_irq;
}