1
0
Fork 0

hwmon: (ltc4261) set data->valid to 0 if error

If there is an error it is better to set data->valid to 0
so the next call to ltc4261_update_device will always be
executed.

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
hifive-unleashed-5.1
Frans Meulenbroeks 2012-01-02 12:03:20 +01:00 committed by Guenter Roeck
parent f58c44e698
commit aac9fe9b46
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ static struct ltc4261_data *ltc4261_update_device(struct device *dev)
"Failed to read ADC value: error %d\n",
val);
ret = ERR_PTR(val);
data->valid = 0;
goto abort;
}
data->regs[i] = val;