Skip to content

Commit 6abce66

Browse files
Ruan JinjiePaolo Abeni
authored andcommitted
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@huawei.com> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Link: https://lore.kernel.org/r/20230802085216.659238-1-ruanjinjie@huawei.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent c1e9e5e commit 6abce66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/cortina/gemini.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,8 +2415,8 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev)
24152415

24162416
/* Interrupt */
24172417
irq = platform_get_irq(pdev, 0);
2418-
if (irq <= 0)
2419-
return irq ? irq : -ENODEV;
2418+
if (irq < 0)
2419+
return irq;
24202420
port->irq = irq;
24212421

24222422
/* Clock the port */

0 commit comments

Comments
 (0)