Commit 23875065 authored by Wei Yongjun's avatar Wei Yongjun Committed by Kleber Sacilotto de Souza

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

BugLink: https://bugs.launchpad.net/bugs/1878232

commit b22ae0b4 upstream.

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

Fixes: c69618b3 ("net/macb: fix probe sequence to setup clocks earlier")
Signed-off-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent e55a8822
...@@ -2904,7 +2904,7 @@ static int macb_probe(struct platform_device *pdev) ...@@ -2904,7 +2904,7 @@ static int macb_probe(struct platform_device *pdev)
dev->irq = platform_get_irq(pdev, 0); dev->irq = platform_get_irq(pdev, 0);
if (dev->irq < 0) { if (dev->irq < 0) {
err = dev->irq; err = dev->irq;
goto err_disable_clocks; goto err_out_free_netdev;
} }
mac = of_get_mac_address(np); mac = of_get_mac_address(np);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment