[PATCH] it87: Fix oops on removal
authorJean Delvare <khali@linux-fr.org>
Tue, 7 Feb 2006 16:53:32 +0000 (17:53 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 14 Feb 2006 06:30:10 +0000 (22:30 -0800)
Fix an oops on it87 module removal when no supported hardware was
found.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/it87.c

index e87d52c599400c5b3a9ddfd8d498c8278420dba0..d7a9401600bb968ec3f81435734b2f0f618a4284 100644 (file)
@@ -1186,7 +1186,8 @@ static int __init sm_it87_init(void)
 
 static void __exit sm_it87_exit(void)
 {
-       i2c_isa_del_driver(&it87_isa_driver);
+       if (isa_address)
+               i2c_isa_del_driver(&it87_isa_driver);
        i2c_del_driver(&it87_driver);
 }