diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-12 16:25:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-12 16:25:04 -0700 |
commit | 5216a3c6d10c891015474fbf7126c92a1845bf74 (patch) | |
tree | 8655b8f225c620432368db57195e69884beee506 /drivers/hwmon/abituguru3.c | |
parent | ab03eca8d4754ef2ba9821d581975b10b8f317e7 (diff) | |
parent | 51b3e2700177b89fdb0d985926ce777a7ad52b15 (diff) |
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon: (f75375s) Remove unnecessary and confusing initialization
hwmon: (it87) Properly decode -128 degrees C temperature
hwmon: (lm90) Document support for the MAX6648/6692 chips
hwmon: (abituguru3) Fix I/O error handling
Diffstat (limited to 'drivers/hwmon/abituguru3.c')
-rw-r--r-- | drivers/hwmon/abituguru3.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index e52b38806d0..ad2b3431b72 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c @@ -760,8 +760,11 @@ static int abituguru3_read_increment_offset(struct abituguru3_data *data, for (i = 0; i < offset_count; i++) if ((x = abituguru3_read(data, bank, offset + i, count, - buf + i * count)) != count) - return i * count + (i && (x < 0)) ? 0 : x; + buf + i * count)) != count) { + if (x < 0) + return x; + return i * count + x; + } return i * count; } |