diff options
author | 2022-10-24 21:13:38 +0800 | |
---|---|---|
committer | 2022-10-25 19:46:35 -0700 | |
commit | 5da6d65590a0698199df44d095e54b0ed1708178 (patch) | |
tree | ab60f8a54277b14de70a8da582d448656eafa4e2 /drivers/net/ethernet/micrel | |
parent | i40e: Fix flow-type by setting GL_HASH_INSET registers (diff) | |
download | linux-5da6d65590a0698199df44d095e54b0ed1708178.tar.gz linux-5da6d65590a0698199df44d095e54b0ed1708178.tar.bz2 linux-5da6d65590a0698199df44d095e54b0ed1708178.zip |
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: 8ca86fd83eae ("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>
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r-- | drivers/net/ethernet/micrel/ksz884x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index 468520079c65..e6acd1e7b263 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c @@ -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; |