diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-04-08 23:48:52 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-04-08 23:48:52 +0400 |
commit | e75d660672ddd11704b7f0fdb8ff21968587b266 (patch) | |
tree | ccb9c107744c10b553c0373e450bee3971d16c00 /drivers/hwmon/i5k_amb.c | |
parent | 61282f37927143e45b03153f3e7b48d6b702147a (diff) | |
parent | 0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff) | |
download | linux-e75d660672ddd11704b7f0fdb8ff21968587b266.tar.xz |
Merge branch 'master' into for-next
Merge with latest Linus' tree, as I have incoming patches
that fix code that is newer than current HEAD of for-next.
Conflicts:
drivers/net/ethernet/realtek/r8169.c
Diffstat (limited to 'drivers/hwmon/i5k_amb.c')
-rw-r--r-- | drivers/hwmon/i5k_amb.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index d22f241b6a67..a18882cc073d 100644 --- a/drivers/hwmon/i5k_amb.c +++ b/drivers/hwmon/i5k_amb.c @@ -159,8 +159,12 @@ static ssize_t store_amb_min(struct device *dev, { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct i5k_amb_data *data = dev_get_drvdata(dev); - unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; + unsigned long temp; + int ret = kstrtoul(buf, 10, &temp); + if (ret < 0) + return ret; + temp = temp / 500; if (temp > 255) temp = 255; @@ -175,8 +179,12 @@ static ssize_t store_amb_mid(struct device *dev, { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct i5k_amb_data *data = dev_get_drvdata(dev); - unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; + unsigned long temp; + int ret = kstrtoul(buf, 10, &temp); + if (ret < 0) + return ret; + temp = temp / 500; if (temp > 255) temp = 255; @@ -191,8 +199,12 @@ static ssize_t store_amb_max(struct device *dev, { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct i5k_amb_data *data = dev_get_drvdata(dev); - unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; + unsigned long temp; + int ret = kstrtoul(buf, 10, &temp); + if (ret < 0) + return ret; + temp = temp / 500; if (temp > 255) temp = 255; |