aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ltc4261.c
diff options
context:
space:
mode:
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2012-01-02 06:03:20 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-01-05 11:19:32 -0500
commitaac9fe9b4697868009e752562e743cc7984809bc (patch)
treeaab0f3d249389d031e82614d4c443e7551852030 /drivers/hwmon/ltc4261.c
parentf58c44e698a8362d2ab2d1c966ca80b748ff9ff9 (diff)
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>
Diffstat (limited to 'drivers/hwmon/ltc4261.c')
-rw-r--r--drivers/hwmon/ltc4261.c1
1 files changed, 1 insertions, 0 deletions
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)
85 "Failed to read ADC value: error %d\n", 85 "Failed to read ADC value: error %d\n",
86 val); 86 val);
87 ret = ERR_PTR(val); 87 ret = ERR_PTR(val);
88 data->valid = 0;
88 goto abort; 89 goto abort;
89 } 90 }
90 data->regs[i] = val; 91 data->regs[i] = val;