We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e91aef2 commit dcb7cb9Copy full SHA for dcb7cb9
drivers/hwmon/ad7414.c
@@ -130,7 +130,11 @@ static ssize_t set_max_min(struct device *dev,
130
struct ad7414_data *data = i2c_get_clientdata(client);
131
int index = to_sensor_dev_attr(attr)->index;
132
u8 reg = AD7414_REG_LIMIT[index];
133
- long temp = simple_strtol(buf, NULL, 10);
+ long temp;
134
+ int ret = kstrtol(buf, 10, &temp);
135
+
136
+ if (ret < 0)
137
+ return ret;
138
139
temp = SENSORS_LIMIT(temp, -40000, 85000);
140
temp = (temp + (temp < 0 ? -500 : 500)) / 1000;
0 commit comments