Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thorsten Blum and committed by
Dmitry Torokhov
de716275 e7b53288

+1 -4
+1 -4
drivers/input/misc/adxl34x-i2c.c
··· 77 77 static int adxl34x_i2c_probe(struct i2c_client *client) 78 78 { 79 79 struct adxl34x *ac; 80 - int error; 81 80 82 - error = i2c_check_functionality(client->adapter, 83 - I2C_FUNC_SMBUS_BYTE_DATA); 84 - if (!error) { 81 + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { 85 82 dev_err(&client->dev, "SMBUS Byte Data not Supported\n"); 86 83 return -EIO; 87 84 }