diff options
Diffstat (limited to 'drivers/hwmon/vt1211.c')
-rw-r--r-- | drivers/hwmon/vt1211.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hwmon/vt1211.c b/drivers/hwmon/vt1211.c index 344b22ec2553..3ea57c3504e2 100644 --- a/drivers/hwmon/vt1211.c +++ b/drivers/hwmon/vt1211.c @@ -879,6 +879,9 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, if (err) return err; + if (val > 255) + return -EINVAL; + data->vrm = val; return count; |