Commit 5d568a16 authored by Jeff Garzik's avatar Jeff Garzik

[netdrvr pcnet32] fix oops on unload

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)
parent be9f10e7
...@@ -1766,8 +1766,6 @@ static void __exit pcnet32_cleanup_module(void) ...@@ -1766,8 +1766,6 @@ static void __exit pcnet32_cleanup_module(void)
next_dev = lp->next; next_dev = lp->next;
unregister_netdev(pcnet32_dev); unregister_netdev(pcnet32_dev);
release_region(pcnet32_dev->base_addr, PCNET32_TOTAL_SIZE); 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); pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr);
free_netdev(pcnet32_dev); free_netdev(pcnet32_dev);
pcnet32_dev = next_dev; pcnet32_dev = next_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment