net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()
pci_disable_device() need be called while module exiting, switch to use
pcim_enable(), pci_disable_device() will be called in pcim_release()
while unbinding device.
Fixes: 8ca86fd83e
("net: Micrel KSZ8841/2 PCI Ethernet driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221024131338.2848959-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Родитель
3b32c99328
Коммит
5da6d65590
|
@ -6851,7 +6851,7 @@ static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
char banner[sizeof(version)];
|
||||
struct ksz_switch *sw = NULL;
|
||||
|
||||
result = pci_enable_device(pdev);
|
||||
result = pcim_enable_device(pdev);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче