Skip to contentSkip to conversation

hwmon (lm63) Do not overwrite data->kind

PATCH New Nicolin Chen 1 participant 1 message Nov 13, 2018 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon (lm63) Do not overwrite data->kind

According to the code right before the removed line, data->kind should be either from DT or from id pointer. So there shouldn't be an additional overwriting after the if-else statement.

So this patch just removes the overwriting line.

---
Guenter,
I have not really tested this change but still sent it out since it looks obvious. Please feel free to drop it if you have concern at an untested change. Thanks.

 drivers/hwmon/lm63.c | 1 -
 1 file changed, 1 deletion(-)
drivers/hwmon/lm63.c +0 -1
index 4c1770920d29..eac54b9cdeec 100644
@@ -1120,7 +1120,6 @@ static int lm63_probe(struct i2c_client *client,
 		data->kind = (enum chips)of_device_get_match_data(&client->dev);
 	else
 		data->kind = id->driver_data;
-	data->kind = id->driver_data;
 	if (data->kind == lm64)
 		data->temp2_offset = 16000;
 
Signature · 1 line
2.17.1