Do not return negative values to i2c_detect on non-fatal errors.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2837 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2005-01-07 20:21:58 +00:00
1 parent da76debaa5
commit aa1f43f680
8 files changed
+17 -44

No files matched your search

+2 -3
View File
@@ -302,11 +302,11 @@ static int lm92_detect (struct i2c_adapter *adapter,int address,unsigned short f
static int id = 0;
struct i2c_client *client;
lm92_t *data;
int result;
int result = 0;
u16 manufacturer;
if (!i2c_check_functionality (adapter,I2C_FUNC_SMBUS_BYTE_DATA))
return (-ENODEV);
return 0;
if (!(data = kmalloc(sizeof(lm92_t), GFP_KERNEL)))
return (-ENOMEM);
@@ -331,7 +331,6 @@ static int lm92_detect (struct i2c_adapter *adapter,int address,unsigned short f
|| manufacturer != LM92_MANUFACTURER_ID)) {
/* Is it a MAX6635/MAX6635/MAX6635? */
if (!max6635_check(client)) {
result = -ENODEV;
goto ERROR2;
}
}