mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user