]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix oops on unload in pcnet32
authorJeff Garzik <jgarzik@pobox.com>
Fri, 5 Dec 2003 15:34:00 +0000 (07:34 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 5 Dec 2003 15:34:00 +0000 (07:34 -0800)
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

index 92fafabcd86b9ac4a3ea72bea644a50e7d191c05..950157166c960f83ff9bdd9cdea08216b679bda0 100644 (file)
@@ -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;