Commit f94c3bce authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: qt2160 - tweak check for i2c adapter functionality

i2c_check_functionality() returns essentially a boolean and not an error
code, so treat it as such.

Link: https://lore.kernel.org/r/20230724051345.335219-1-dmitry.torokhov@gmail.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 92e24e0e
...@@ -345,12 +345,9 @@ static int qt2160_probe(struct i2c_client *client) ...@@ -345,12 +345,9 @@ static int qt2160_probe(struct i2c_client *client)
int i; int i;
int error; int error;
/* Check functionality */ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE)) {
error = i2c_check_functionality(client->adapter,
I2C_FUNC_SMBUS_BYTE);
if (!error) {
dev_err(&client->dev, "%s adapter not supported\n", dev_err(&client->dev, "%s adapter not supported\n",
dev_driver_string(&client->adapter->dev)); dev_driver_string(&client->adapter->dev));
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment