Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / drivers / hwmon / lm87.c
index ba1d83d480563a14c8bafae0c38df8bb6edd2740..a5e295826aeae10fdbc1e517445f953d644f8811 100644 (file)
@@ -617,6 +617,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;
 }
This page took 0.029276 seconds and 5 git commands to generate.