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

+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;
}