Commit aac9fe9b authored by Frans Meulenbroeks's avatar Frans Meulenbroeks Committed by Guenter Roeck

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: default avatarFrans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent f58c44e6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment