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:
Thorsten Blum 2026-04-28 18:58:01 +02:00 committed by Lee Jones
parent 484c67469d
commit d11880e32e

View File

@ -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);