mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-13 22:14:20 +08:00
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>
This commit is contained in:
parent
c1e9e5e0b9
commit
6abce66ba9
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user