aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hwmon/vt1211.c3
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,
879 if (err) 879 if (err)
880 return err; 880 return err;
881 881
882 if (val > 255)
883 return -EINVAL;
884
882 data->vrm = val; 885 data->vrm = val;
883 886
884 return count; 887 return count;