Skip to content

Commit

Permalink
hwmon: (ltc4261) set data->valid to 0 if error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frans Meulenbroeks authored and Guenter Roeck committed Jan 5, 2012
1 parent f58c44e commit aac9fe9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hwmon/ltc4261.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aac9fe9

Please sign in to comment.