aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83781d.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/w83781d.c')
-rw-r--r--drivers/hwmon/w83781d.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index a4584ec69842..fea92061f863 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -1685,11 +1685,10 @@ sensors_w83781d_init(void)
1685 if (res) 1685 if (res)
1686 return res; 1686 return res;
1687 1687
1688 res = i2c_isa_add_driver(&w83781d_isa_driver); 1688 /* Don't exit if this one fails, we still want the I2C variants
1689 if (res) { 1689 to work! */
1690 i2c_del_driver(&w83781d_driver); 1690 if (i2c_isa_add_driver(&w83781d_isa_driver))
1691 return res; 1691 isa_address = 0;
1692 }
1693 1692
1694 return 0; 1693 return 0;
1695} 1694}
@@ -1697,7 +1696,8 @@ sensors_w83781d_init(void)
1697static void __exit 1696static void __exit
1698sensors_w83781d_exit(void) 1697sensors_w83781d_exit(void)
1699{ 1698{
1700 i2c_isa_del_driver(&w83781d_isa_driver); 1699 if (isa_address)
1700 i2c_isa_del_driver(&w83781d_isa_driver);
1701 i2c_del_driver(&w83781d_driver); 1701 i2c_del_driver(&w83781d_driver);
1702} 1702}
1703 1703