This patch adds pci_disable_device in the appropriate places to
eliminate the following message when removing the module.
pcnet32 0000:00:05.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
pcnet32 0000:02:05.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
Tested ia32.
signed-off-by: Don Fry <brazilnut@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
return -EBUSY;
}
- return pcnet32_probe1(ioaddr, 1, pdev);
+ err = pcnet32_probe1(ioaddr, 1, pdev);
+ if (err < 0) {
+ pci_disable_device(pdev);
+ }
+ return err;
}
release_region(dev->base_addr, PCNET32_TOTAL_SIZE);
pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr);
free_netdev(dev);
+ pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
}
}