--- zzzz-none-000/linux-3.10.107/drivers/hwmon/w83793.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/hwmon/w83793.c 2021-02-04 17:41:59.000000000 +0000 @@ -353,6 +353,9 @@ if (err) return err; + if (val > 255) + return -EINVAL; + data->vrm = val; return count; } @@ -808,7 +811,7 @@ if (nr == TEMP_FAN_MAP) { val = data->temp_fan_map[index]; } else if (nr == TEMP_PWM_ENABLE) { - /* +2 to transfrom into 2 and 3 to conform with sysfs intf */ + /* +2 to transform into 2 and 3 to conform with sysfs intf */ val = ((data->pwm_enable >> index) & 0x01) + 2; } else if (nr == TEMP_CRUISE) { val = TEMP_FROM_REG(data->temp_cruise[index] & 0x7f); @@ -1199,7 +1202,8 @@ static int watchdog_set_timeout(struct w83793_data *data, int timeout) { - int ret, mtimeout; + unsigned int mtimeout; + int ret; mtimeout = DIV_ROUND_UP(timeout, 60);