mfd: twl-core: Use i2c_check_functionality as boolean value

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>
This commit is contained in:
Thorsten Blum
2026-05-05 13:45:43 +02:00
committed by Lee Jones
parent d11880e32e
commit 7ee4fa2674

View 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;