Fix an error path. If initialization fails, we want to restore the physical

bus, not delete it again. Backported from Linux 2.6.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5217 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2008-05-01 10:53:50 +00:00
1 parent b097de4ba4
commit 20041cbfe1
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ lm_sensors CHANGES file
SVN-HEAD
Library: Don't choke on unrecognized devices, part 2
Module i2c-amd756-s4882: Fix an error path (2.6 backport)
Module i2c-i801: Drop broken I2C block read support
Module i2c-piix4: Minor cleanups (2.6 backport)
Module i2c-sis5595: Minor cleanups (2.6 backport)
+2 -1
View File
@@ -230,7 +230,8 @@ ERROR2:
kfree(s4882_adapter);
s4882_adapter = NULL;
ERROR1:
i2c_del_adapter(&amd756_smbus);
/* Restore physical bus */
i2c_add_adapter(&amd756_smbus);
ERROR0:
return error;
}