gem_init_one() enables the PCI device with pci_enable_device(). The probe failure path balances this operation with pci_disable_device(). However, after a successful probe, gem_remove_one() releases the PCI resources and netdev without disabling the PCI device. Call pci_disable_device() during removal to balance the successful pci_enable_device() call. This issue was found by manual code inspection. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li --- drivers/net/ethernet/sun/sungem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c index dc5638d105db..6abf4d292802 100644 --- a/drivers/net/ethernet/sun/sungem.c +++ b/drivers/net/ethernet/sun/sungem.c @@ -2806,6 +2806,7 @@ static void gem_remove_one(struct pci_dev *pdev) iounmap(gp->regs); pci_release_regions(pdev); free_netdev(dev); + pci_disable_device(pdev); } } -- 2.43.0