mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-30 13:00:30 +00:00
Check for capabilities before using them. Reported by Aurelien
Jarno. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2360 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
9b65707bd1
commit
c44b1691cc
2 files changed
+4
-2
No files matched your search
@@ -183,7 +183,8 @@ int ds1621_detect(struct i2c_adapter *adapter, int address,
|
||||
#endif
|
||||
|
||||
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
|
||||
I2C_FUNC_SMBUS_WORD_DATA))
|
||||
I2C_FUNC_SMBUS_WORD_DATA |
|
||||
I2C_FUNC_SMBUS_WRITE_BYTE))
|
||||
goto ERROR0;
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
|
||||
@@ -179,7 +179,8 @@ int pcf8591_detect(struct i2c_adapter *adapter, int address,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE))
|
||||
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE
|
||||
| I2C_FUNC_SMBUS_WRITE_BYTE_DATA))
|
||||
goto ERROR0;
|
||||
|
||||
/* OK. For now, we presume we have a valid client. We now create the
|
||||
|
||||
Reference in new issue
Block a user