Commit e627eccb authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds

[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)
parent 67a0713c
......@@ -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;
......
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