diff options
-rw-r--r-- | drivers/hwmon/adm1026.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c index ca8430f92564..e67b9a50ac7c 100644 --- a/drivers/hwmon/adm1026.c +++ b/drivers/hwmon/adm1026.c @@ -1085,6 +1085,9 @@ static ssize_t store_vrm_reg(struct device *dev, struct device_attribute *attr, if (err) return err; + if (val > 255) + return -EINVAL; + data->vrm = val; return count; } |