hwmon: w83793d: remove redundant assignment to variable res
PATCH 1/1 hwmon: w83793d: remove redundant assignment to variable res
From: Colin Ian King <[email protected]>
The variable res is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- drivers/hwmon/w83793.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/w83793.c +1 -1
@@ -2096,7 +2096,7 @@ static struct w83793_data *w83793_update_device(struct device *dev)static u8 w83793_read_value (struct i2c_client *client,u16 reg) {struct w83793_data *data =i2c_get_clientdata (client); -u8 res =0xff ; +u8 res;u8 new_bank = reg >>8 ; new_bank |= data->bank &0xfc ;
Signature · 1 line
2.20.1
Quoted 8 lines · Colin King
From: Colin Ian King <[email protected]>
The variable res is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
Applied. Note that I removed the above Addreddes-Coverity tag as it doesn't really make much sense.
Guenter
Quoted 17 lines
--- drivers/hwmon/w83793.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/w83793.c +1
-1@@ -2096,7 +2096,7 @@ static struct w83793_data *w83793_update_device(struct device *dev)static u8 w83793_read_value (struct i2c_client *client,u16 reg) {struct w83793_data *data =i2c_get_clientdata (client); -u8 res =0xff ; +u8 res;u8 new_bank = reg >>8 ; new_bank |= data->bank &0xfc ;