Cannot directly return platform_get_irq return irq, there
are operations that need to be undone.
Fixes: bf2b83425b59 ("net: mv643xx_eth: use platform_get_irq() instead of platform_get_resource()")
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220316012444.2126070-1-chi.minghao@zte.com.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
irq = platform_get_irq(pdev, 0);
- if (WARN_ON(irq < 0))
- return irq;
+ if (WARN_ON(irq < 0)) {
+ err = irq;
+ goto out;
+ }
dev->irq = irq;
dev->netdev_ops = &mv643xx_eth_netdev_ops;