Skip to content

Commit f94c3bc

Browse files
committed
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/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 92e24e0 commit f94c3bc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/input/keyboard/qt2160.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,9 @@ static int qt2160_probe(struct i2c_client *client)
345345
int i;
346346
int error;
347347

348-
/* Check functionality */
349-
error = i2c_check_functionality(client->adapter,
350-
I2C_FUNC_SMBUS_BYTE);
351-
if (!error) {
348+
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE)) {
352349
dev_err(&client->dev, "%s adapter not supported\n",
353-
dev_driver_string(&client->adapter->dev));
350+
dev_driver_string(&client->adapter->dev));
354351
return -ENODEV;
355352
}
356353

0 commit comments

Comments
 (0)