diff mbox series

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

Message ID 20230803083452.4085650-3-ruanjinjie@huawei.com (mailing list archive)
State New, archived
Headers show
Series irqchip: Do not check for 0 return after calling platform_get_irq() | expand

Commit Message

Jinjie Ruan Aug. 3, 2023, 8:34 a.m. UTC
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>
---
 drivers/irqchip/irq-pruss-intc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index fa8d89b02ec0..ee69e8d83b9a 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;
 		}