mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02: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:
parent
d11880e32e
commit
7ee4fa2674
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user