net: mv643xx_eth: undo some opreations in mv643xx_eth_probe
authorMinghao Chi <chi.minghao@zte.com.cn>
Wed, 16 Mar 2022 01:24:44 +0000 (01:24 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Mar 2022 02:31:00 +0000 (19:31 -0700)
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>
drivers/net/ethernet/marvell/mv643xx_eth.c

index e6cd4e2..5f9ab18 100644 (file)
@@ -3189,8 +3189,10 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
 
 
        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;