qlge: add missing free_netdev() on error in qlge_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 22 May 2013 23:09:50 +0000 (23:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 26 May 2013 04:22:32 +0000 (21:22 -0700)
Add the missing free_netdev() before return from function
qlge_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlge/qlge_main.c

index 50235d2015925b4d70737b59e8268b107ed5d5c4..f87cc216045b5feb5e20dbc2f4df3fe2190eba14 100644 (file)
@@ -4717,6 +4717,7 @@ static int qlge_probe(struct pci_dev *pdev,
                dev_err(&pdev->dev, "net device registration failed.\n");
                ql_release_all(pdev);
                pci_disable_device(pdev);
+               free_netdev(ndev);
                return err;
        }
        /* Start up the timer to trigger EEH if