diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-07-24 08:13:39 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-07-29 04:02:44 +0300 |
commit | f94c3bce7491228733b765e60189aa325b866ff0 (patch) | |
tree | 3b0d43b2a11135f4cdfb8df541e2758f7a330727 /drivers/input/keyboard/qt2160.c | |
parent | 92e24e0e57f72e06c2df87116557331fd2d4dda2 (diff) | |
download | linux-f94c3bce7491228733b765e60189aa325b866ff0.tar.xz |
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>
Diffstat (limited to 'drivers/input/keyboard/qt2160.c')
-rw-r--r-- | drivers/input/keyboard/qt2160.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/input/keyboard/qt2160.c b/drivers/input/keyboard/qt2160.c index 599ea85cfd30..b0b9d7a2691e 100644 --- a/drivers/input/keyboard/qt2160.c +++ b/drivers/input/keyboard/qt2160.c @@ -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; } |