[patch 19/39] [PATCH] it87: Fix oops on removal

From: Chris Wright
Date: Mon Feb 27 2006 - 17:44:08 EST


-stable review patch. If anyone has any objections, please let us know.
------------------

Fix an oops on it87 module removal when no supported hardware was
found.

Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
---

drivers/hwmon/it87.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.15.4.orig/drivers/hwmon/it87.c
+++ linux-2.6.15.4/drivers/hwmon/it87.c
@@ -1180,7 +1180,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);
}


--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/