]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mfd: twl-core: Use i2c_check_functionality as boolean value
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 5 May 2026 11:45:43 +0000 (13:45 +0200)
committerLee Jones <lee@kernel.org>
Wed, 17 Jun 2026 10:32:12 +0000 (11:32 +0100)
i2c_check_functionality() returns a boolean status rather than an error
code - directly use it as a boolean value.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260505114543.159381-2-thorsten.blum@linux.dev
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/twl-core.c

index f89eda4a17fe43cee3dcd6f958ea0a1d48fcdaa4..c024a28b057e3906b97abdb1bb7fba1b272136bf 100644 (file)
@@ -754,7 +754,7 @@ twl_probe(struct i2c_client *client)
                return status;
        }
 
-       if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) {
+       if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
                dev_dbg(&client->dev, "can't talk I2C?\n");
                status = -EIO;
                goto free;