mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
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.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
92e24e0e57
commit
f94c3bce74
@ -345,12 +345,9 @@ static int qt2160_probe(struct i2c_client *client)
|
||||
int i;
|
||||
int error;
|
||||
|
||||
/* Check functionality */
|
||||
error = i2c_check_functionality(client->adapter,
|
||||
I2C_FUNC_SMBUS_BYTE);
|
||||
if (!error) {
|
||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE)) {
|
||||
dev_err(&client->dev, "%s adapter not supported\n",
|
||||
dev_driver_string(&client->adapter->dev));
|
||||
dev_driver_string(&client->adapter->dev));
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user