Commit 194324d4 authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[PATCH] I2C: fix mor rmmod oopses

> Oh nevermind, that's just a dumb driver.  It's doing a release_region
> on memory it didn't get.  Stupid, stupid, stupid...

While we're at it, what about fixing two other drivers that obviously
have the same problem?

(BTW I didn't get an oops as I tried reproducing the problem, only a
"Trying to free nonexistent resource" in dmesg.)
parent 9786b1b5
...@@ -608,6 +608,7 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id ...@@ -608,6 +608,7 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id
static void __devexit i801_remove(struct pci_dev *dev) static void __devexit i801_remove(struct pci_dev *dev)
{ {
i2c_del_adapter(&i801_adapter); i2c_del_adapter(&i801_adapter);
release_region(i801_smba, (isich4 ? 16 : 8));
} }
static struct pci_driver i801_driver = { static struct pci_driver i801_driver = {
...@@ -625,7 +626,6 @@ static int __init i2c_i801_init(void) ...@@ -625,7 +626,6 @@ static int __init i2c_i801_init(void)
static void __exit i2c_i801_exit(void) static void __exit i2c_i801_exit(void)
{ {
pci_unregister_driver(&i801_driver); pci_unregister_driver(&i801_driver);
release_region(i801_smba, (isich4 ? 16 : 8));
} }
MODULE_AUTHOR ("Frodo Looijaard <frodol@dds.nl>, " MODULE_AUTHOR ("Frodo Looijaard <frodol@dds.nl>, "
......
...@@ -391,6 +391,7 @@ static int __devinit sis5595_probe(struct pci_dev *dev, const struct pci_device_ ...@@ -391,6 +391,7 @@ static int __devinit sis5595_probe(struct pci_dev *dev, const struct pci_device_
static void __devexit sis5595_remove(struct pci_dev *dev) static void __devexit sis5595_remove(struct pci_dev *dev)
{ {
i2c_del_adapter(&sis5595_adapter); i2c_del_adapter(&sis5595_adapter);
release_region(sis5595_base + SMB_INDEX, 2);
} }
static struct pci_driver sis5595_driver = { static struct pci_driver sis5595_driver = {
...@@ -408,7 +409,6 @@ static int __init i2c_sis5595_init(void) ...@@ -408,7 +409,6 @@ static int __init i2c_sis5595_init(void)
static void __exit i2c_sis5595_exit(void) static void __exit i2c_sis5595_exit(void)
{ {
pci_unregister_driver(&sis5595_driver); pci_unregister_driver(&sis5595_driver);
release_region(sis5595_base + SMB_INDEX, 2);
} }
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>"); 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