[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230802085216.659238-1-ruanjinjie@huawei.com>
Date: Wed, 2 Aug 2023 16:52:16 +0800
From: Ruan Jinjie <ruanjinjie@...wei.com>
To: <ulli.kroll@...glemail.com>, <linus.walleij@...aro.org>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <linux-arm-kernel@...ts.infradead.org>,
<netdev@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH net-next] net: gemini: 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@...wei.com>
---
drivers/net/ethernet/cortina/gemini.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
index 5715b9ab2712..692cb2d04c1c 100644
--- a/drivers/net/ethernet/cortina/gemini.c
+++ b/drivers/net/ethernet/cortina/gemini.c
@@ -2415,8 +2415,8 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev)
/* Interrupt */
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return irq ? irq : -ENODEV;
+ if (irq < 0)
+ return irq;
port->irq = irq;
/* Clock the port */
--
2.34.1
Powered by blists - more mailing lists