i2c_check_functionality() returns a boolean status rather than an error code - directly use it as a boolean value.
Unified · Split
| @@ -754,7 +754,7 @@ twl_probe(struct i2c_client *client) · 753 unmodified lines | ||
| 754 | 754 | return status; |
| 755 | 755 | } |
| 756 | 756 | |
| 757 | − if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) { | |
| 757 | + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { | |
| 758 | 758 | dev_dbg(&client->dev, "can't talk I2C?\n"); |
| 759 | 759 | status = -EIO; |
| 760 | 760 | goto free; |