Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: macb: add missing free_netdev() on error in macb_probe()

Add the missing free_netdev() before return from function macb_probe()
in the platform_get_irq() error handling case.

Fixes: c69618b3e4f2 ("net/macb: fix probe sequence to setup clocks earlier")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Wei Yongjun and committed by
David S. Miller
b22ae0b4 02ee9b18

+1 -1
+1 -1
drivers/net/ethernet/cadence/macb.c
··· 2985 2985 dev->irq = platform_get_irq(pdev, 0); 2986 2986 if (dev->irq < 0) { 2987 2987 err = dev->irq; 2988 - goto err_disable_clocks; 2988 + goto err_out_free_netdev; 2989 2989 } 2990 2990 2991 2991 mac = of_get_mac_address(np);