Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming...
[deliverable/linux.git] / drivers / hwmon / lm87.c
index 4c5f20231c1a6a71e0daa66116340dfb701ff8b5..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;
 }
@@ -903,7 +907,6 @@ static int lm87_probe(struct i2c_client *client, const struct i2c_device_id *id)
                return -ENOMEM;
 
        i2c_set_clientdata(client, data);
-       data->valid = 0;
        mutex_init(&data->update_lock);
 
        /* Initialize the LM87 chip */
This page took 0.025015 seconds and 5 git commands to generate.