Revert "hwmon: (nct6775-core) Fix underflows seen when writing limit attributes"

This reverts commit 8233145bc9.
This commit is contained in:
Ksawlii 2024-11-24 00:23:40 +01:00
parent b6b1cfa179
commit 434e0c060b

View file

@ -2374,7 +2374,7 @@ store_temp_offset(struct device *dev, struct device_attribute *attr,
if (err < 0)
return err;
val = DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), 1000);
val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -128, 127);
mutex_lock(&data->update_lock);
data->temp_offset[nr] = val;