diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/asb100.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/asb100.c index f96063680e5..272fcc837ec 100644 --- a/drivers/hwmon/asb100.c +++ b/drivers/hwmon/asb100.c @@ -510,6 +510,10 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, err = kstrtoul(buf, 10, &val); if (err) return err; + + if (val > 255) + return -EINVAL; + data->vrm = val; return count; } |