public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] i2c driver fixes for 2.6.4
Date: Mon, 15 Mar 2004 14:56:31 -0800	[thread overview]
Message-ID: <10793913911614@kroah.com> (raw)
In-Reply-To: <10793913913301@kroah.com>

ChangeSet 1.1557.61.9, 2004/02/23 16:27:33-08:00, khali@linux-fr.org

[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.)


 drivers/i2c/busses/i2c-i801.c    |    2 +-
 drivers/i2c/busses/i2c-sis5595.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
--- a/drivers/i2c/busses/i2c-i801.c	Mon Mar 15 14:37:14 2004
+++ b/drivers/i2c/busses/i2c-i801.c	Mon Mar 15 14:37:14 2004
@@ -608,6 +608,7 @@
 static void __devexit i801_remove(struct pci_dev *dev)
 {
 	i2c_del_adapter(&i801_adapter);
+	release_region(i801_smba, (isich4 ? 16 : 8));
 }
 
 static struct pci_driver i801_driver = {
@@ -625,7 +626,6 @@
 static void __exit i2c_i801_exit(void)
 {
 	pci_unregister_driver(&i801_driver);
-	release_region(i801_smba, (isich4 ? 16 : 8));
 }
 
 MODULE_AUTHOR ("Frodo Looijaard <frodol@dds.nl>, "
diff -Nru a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
--- a/drivers/i2c/busses/i2c-sis5595.c	Mon Mar 15 14:37:14 2004
+++ b/drivers/i2c/busses/i2c-sis5595.c	Mon Mar 15 14:37:14 2004
@@ -391,6 +391,7 @@
 static void __devexit sis5595_remove(struct pci_dev *dev)
 {
 	i2c_del_adapter(&sis5595_adapter);
+	release_region(sis5595_base + SMB_INDEX, 2);
 }
 
 static struct pci_driver sis5595_driver = {
@@ -408,7 +409,6 @@
 static void __exit i2c_sis5595_exit(void)
 {
 	pci_unregister_driver(&sis5595_driver);
-	release_region(sis5595_base + SMB_INDEX, 2);
 }
 
 MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");


  reply	other threads:[~2004-03-16  0:04 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 22:48 [BK PATCH] i2c driver fixes for 2.6.4 Greg KH
2004-03-15 22:56 ` [PATCH] " Greg KH
2004-03-15 22:56   ` Greg KH
2004-03-15 22:56     ` Greg KH
2004-03-15 22:56       ` Greg KH
2004-03-15 22:56         ` Greg KH
2004-03-15 22:56           ` Greg KH
2004-03-15 22:56             ` Greg KH
2004-03-15 22:56               ` Greg KH
2004-03-15 22:56                 ` Greg KH [this message]
2004-03-15 22:56                   ` Greg KH
2004-03-15 22:56                     ` Greg KH
2004-03-15 22:56                       ` Greg KH
2004-03-15 22:56                         ` Greg KH
2004-03-15 22:56                           ` Greg KH
2004-03-15 22:56                             ` Greg KH
2004-03-15 22:56                               ` Greg KH
2004-03-15 22:56                                 ` Greg KH
2004-03-15 22:56                                   ` Greg KH
2004-03-15 22:56                                     ` Greg KH
2004-03-15 22:56                                       ` Greg KH
2004-03-15 22:56                                         ` Greg KH
2004-03-15 22:56                                           ` Greg KH
2004-03-15 22:56                                             ` Greg KH
2004-03-15 22:56                                               ` Greg KH
2004-03-15 22:56                                                 ` Greg KH
2004-03-15 22:56                                                   ` Greg KH
2004-03-15 22:56                                                     ` Greg KH
2004-03-15 22:56                                                       ` Greg KH
2004-03-15 22:56                                                         ` Greg KH
2004-03-15 22:56                                                           ` Greg KH
2004-03-15 22:56                                                             ` Greg KH
2004-03-15 22:56                                                               ` Greg KH
2004-03-15 22:56                                                                 ` Greg KH
2004-03-15 22:56                                                                   ` Greg KH
2004-03-15 22:56                                                                     ` Greg KH
2004-03-15 22:56                                                                       ` Greg KH
2004-03-15 22:56                                                                         ` Greg KH
2004-03-15 22:56                                                                           ` Greg KH
2004-03-15 22:56                                                                             ` Greg KH
2004-03-15 22:56                                                                               ` Greg KH
2004-03-15 22:56                                                                                 ` Greg KH
2004-03-15 22:56                                                                                   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10793913911614@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox