diff options
Diffstat (limited to 'drivers/hwmon')
-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 e52b38806d03..ad2b3431b725 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, | |||
760 | 760 | ||
761 | for (i = 0; i < offset_count; i++) | 761 | for (i = 0; i < offset_count; i++) |
762 | if ((x = abituguru3_read(data, bank, offset + i, count, | 762 | if ((x = abituguru3_read(data, bank, offset + i, count, |
763 | buf + i * count)) != count) | 763 | buf + i * count)) != count) { |
764 | return i * count + (i && (x < 0)) ? 0 : x; | 764 | if (x < 0) |
765 | return x; | ||
766 | return i * count + x; | ||
767 | } | ||
765 | 768 | ||
766 | return i * count; | 769 | return i * count; |
767 | } | 770 | } |