From e627eccb7eeb28e39141bf8278b154f0ec6bdadb Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Fri, 5 Dec 2003 07:34:00 -0800 Subject: [PATCH] [PATCH] fix oops on unload in pcnet32 The driver was calling pci_unregister_driver for each _device_, and then again at the end of the module unload routine. Remove the call that's inside the loop, pci_unregister_driver should only be called once. Caught by Don Fry (and many others) --- drivers/net/pcnet32.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 92fafabcd86b9..950157166c960 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -1766,8 +1766,6 @@ static void __exit pcnet32_cleanup_module(void) next_dev = lp->next; unregister_netdev(pcnet32_dev); release_region(pcnet32_dev->base_addr, PCNET32_TOTAL_SIZE); - if (lp->pci_dev) - pci_unregister_driver(&pcnet32_driver); pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr); free_netdev(pcnet32_dev); pcnet32_dev = next_dev; -- 2.53.0