Input: adxl34x - Drop redundant error variable in adxl34x_i2c_probe
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/input/misc/adxl34x-i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/input/misc/adxl34x-i2c.c +1 -4
@@ -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 ; }
Signature · 2 lines
Thorsten Blum <[email protected]> GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4
Quoted 4 lines · Thorsten Blum
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 <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry