mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
mfd: menf21bmc: Inline i2c_check_functionality check
Inline the i2c_check_functionality() check, since the function returns a boolean status rather than an error code. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260428165800.590496-3-thorsten.blum@linux.dev Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
484c67469d
commit
d11880e32e
|
|
@ -54,11 +54,9 @@ menf21bmc_probe(struct i2c_client *client)
|
|||
int rev_major, rev_minor, rev_main;
|
||||
int ret;
|
||||
|
||||
ret = i2c_check_functionality(client->adapter,
|
||||
I2C_FUNC_SMBUS_BYTE_DATA |
|
||||
I2C_FUNC_SMBUS_WORD_DATA |
|
||||
I2C_FUNC_SMBUS_BYTE);
|
||||
if (!ret)
|
||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA |
|
||||
I2C_FUNC_SMBUS_WORD_DATA |
|
||||
I2C_FUNC_SMBUS_BYTE))
|
||||
return -ENODEV;
|
||||
|
||||
rev_major = i2c_smbus_read_word_data(client, BMC_CMD_REV_MAJOR);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user