diff options
Diffstat (limited to 'drivers/hwmon/lm78.c')
-rw-r--r-- | drivers/hwmon/lm78.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c index ac1b746df6d0..73bc2ffc598d 100644 --- a/drivers/hwmon/lm78.c +++ b/drivers/hwmon/lm78.c | |||
@@ -815,18 +815,18 @@ static int __init sm_lm78_init(void) | |||
815 | if (res) | 815 | if (res) |
816 | return res; | 816 | return res; |
817 | 817 | ||
818 | res = i2c_isa_add_driver(&lm78_isa_driver); | 818 | /* Don't exit if this one fails, we still want the I2C variants |
819 | if (res) { | 819 | to work! */ |
820 | i2c_del_driver(&lm78_driver); | 820 | if (i2c_isa_add_driver(&lm78_isa_driver)) |
821 | return res; | 821 | isa_address = 0; |
822 | } | ||
823 | 822 | ||
824 | return 0; | 823 | return 0; |
825 | } | 824 | } |
826 | 825 | ||
827 | static void __exit sm_lm78_exit(void) | 826 | static void __exit sm_lm78_exit(void) |
828 | { | 827 | { |
829 | i2c_isa_del_driver(&lm78_isa_driver); | 828 | if (isa_address) |
829 | i2c_isa_del_driver(&lm78_isa_driver); | ||
830 | i2c_del_driver(&lm78_driver); | 830 | i2c_del_driver(&lm78_driver); |
831 | } | 831 | } |
832 | 832 | ||