Skip to content

Commit

Permalink
net: gemini: Do not check for 0 return after calling platform_get_irq()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ruan Jinjie authored and Paolo Abeni committed Aug 3, 2023
1 parent c1e9e5e commit 6abce66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/cortina/gemini.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6abce66

Please sign in to comment.