Commit 01f9820e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

I2C: fix oops in i2c-ali1535 driver if no hardware is present.

Thanks to Dave Jones for pointing this out.
parent 238c5a50
......@@ -517,6 +517,7 @@ static int __devinit ali1535_probe(struct pci_dev *dev, const struct pci_device_
static void __devexit ali1535_remove(struct pci_dev *dev)
{
i2c_del_adapter(&ali1535_adapter);
release_region(ali1535_smba, ALI1535_SMB_IOSIZE);
}
static struct pci_driver ali1535_driver = {
......@@ -534,7 +535,6 @@ static int __init i2c_ali1535_init(void)
static void __exit i2c_ali1535_exit(void)
{
pci_unregister_driver(&ali1535_driver);
release_region(ali1535_smba, ALI1535_SMB_IOSIZE);
}
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, "
......
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