Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230803083452.4085650-3-ruanjinjie@huawei.com

authored by

Ruan Jinjie and committed by
Marc Zyngier
d0afed83 2f54db44

+2 -2
+2 -2
drivers/irqchip/irq-pruss-intc.c
··· 565 565 continue; 566 566 567 567 irq = platform_get_irq_byname(pdev, irq_names[i]); 568 - if (irq <= 0) { 569 - ret = (irq == 0) ? -EINVAL : irq; 568 + if (irq < 0) { 569 + ret = irq; 570 570 goto fail_irq; 571 571 } 572 572