mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
amd-xgbe: Fix error path in xgbe_mod_init()
In xgbe_mod_init(), we should do cleanup if some error occurs Reported-by: Hulk Robot <hulkci@huawei.com> Fixes:efbaa82833
("amd-xgbe: Add support to handle device renaming") Fixes:47f164deab
("amd-xgbe: Add PCI device support") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8693265329
commit
b6b4dc4c1f
@ -469,13 +469,19 @@ static int __init xgbe_mod_init(void)
|
||||
|
||||
ret = xgbe_platform_init();
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_platform_init;
|
||||
|
||||
ret = xgbe_pci_init();
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_pci_init;
|
||||
|
||||
return 0;
|
||||
|
||||
err_pci_init:
|
||||
xgbe_platform_exit();
|
||||
err_platform_init:
|
||||
unregister_netdevice_notifier(&xgbe_netdev_notifier);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit xgbe_mod_exit(void)
|
||||
|
Loading…
Reference in New Issue
Block a user