History

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.

Thorsten Blum committed 6 months ago

Commit 7ee4fa21 parent d11880e1 file · +1 −1Browse files

Unified · Split

drivers/mfd/twl-core.c+1−1
@@ -754,7 +754,7 @@ twl_probe(struct i2c_client *client) · 753 unmodified lines
754754 return status;
755755 }
756756
757− if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) {
757+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
758758 dev_dbg(&client->dev, "can't talk I2C?\n");
759759 status = -EIO;
760760 goto free;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t