diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-02-23 01:03:04 +0100 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-02-22 19:52:22 -0800 |
| commit | de716275941af60247967887be3303e144ed57d7 (patch) | |
| tree | 6dae19eb0c213b1c06282e596f01b24fa88a92d8 /drivers/input | |
| parent | e7b53288d9ea899abc6d47a7f20065ab511a810c (diff) | |
Input: adxl34x - drop redundant error variable in adxl34x_i2c_probe
Inline i2c_check_functionality(), which really returns a bool and not an
error code, and remove the local variable. No functional changes.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260223000308.319335-1-thorsten.blum@linux.dev
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/misc/adxl34x-i2c.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c index c05d898898e8..5ea0ce42a507 100644 --- a/drivers/input/misc/adxl34x-i2c.c +++ b/drivers/input/misc/adxl34x-i2c.c @@ -77,11 +77,8 @@ static const struct adxl34x_bus_ops adxl34x_i2c_bops = { static int adxl34x_i2c_probe(struct i2c_client *client) { struct adxl34x *ac; - int error; - error = i2c_check_functionality(client->adapter, - I2C_FUNC_SMBUS_BYTE_DATA); - if (!error) { + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { dev_err(&client->dev, "SMBUS Byte Data not Supported\n"); return -EIO; } |
