mirror of https://github.com/torvalds/linux.git
Input: qt1070 - inline i2c_check_functionality check
Inline the i2c_check_functionality() check, since the function returns a boolean status rather than an error code. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260408141926.1181389-4-thorsten.blum@linux.dev Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
512b0f41aa
commit
16bbb59127
|
|
@ -133,8 +133,7 @@ static int qt1070_probe(struct i2c_client *client)
|
|||
int i;
|
||||
int err;
|
||||
|
||||
err = i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE);
|
||||
if (!err) {
|
||||
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));
|
||||
return -ENODEV;
|
||||
|
|
|
|||
Loading…
Reference in New Issue