X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fhwmon%2Fds620.c;h=06da77b658877228c7dd6ff662597f8763ad4892;hp=225ae4f36583e757d60597eafbee04ca70aad7cc;hb=b5f21d80f536b5987ff6e209e6d57d4e39c2caab;hpb=7abec10c623d9e0416dab6919a0ea22e6283516b diff --git a/drivers/hwmon/ds620.c b/drivers/hwmon/ds620.c index 225ae4f36583..06da77b65887 100644 --- a/drivers/hwmon/ds620.c +++ b/drivers/hwmon/ds620.c @@ -166,7 +166,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da, if (res) return res; - val = (val * 10 / 625) * 8; + val = (clamp_val(val, -128000, 128000) * 10 / 625) * 8; mutex_lock(&data->update_lock); data->temp[attr->index] = val;