From aac9fe9b4697868009e752562e743cc7984809bc Mon Sep 17 00:00:00 2001 From: Frans Meulenbroeks Date: Mon, 2 Jan 2012 12:03:20 +0100 Subject: 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 Signed-off-by: Guenter Roeck --- drivers/hwmon/ltc4261.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/hwmon/ltc4261.c') diff --git a/drivers/hwmon/ltc4261.c b/drivers/hwmon/ltc4261.c index 4b50601027d3..ce5235560f01 100644 --- a/drivers/hwmon/ltc4261.c +++ b/drivers/hwmon/ltc4261.c @@ -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; -- cgit v1.2.3-58-ga151