]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mfd: menf21bmc: Inline i2c_check_functionality check
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 28 Apr 2026 16:58:01 +0000 (18:58 +0200)
committerLee Jones <lee@kernel.org>
Wed, 17 Jun 2026 10:32:09 +0000 (11:32 +0100)
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>
drivers/mfd/menf21bmc.c

index 1d36095155e047446bbb95f21828bfa442247748..0f24de516d72423a95fcf241d971c082d058054c 100644 (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);