static ssize_t store_go_maxspeed_load(struct kobject *kobj,
struct attribute *attr, const char *buf, size_t count)
{
- return strict_strtoul(buf, 0, &go_maxspeed_load);
+ int ret;
+ unsigned long val;
+
+ ret = strict_strtoul(buf, 0, &val);
+ if (ret < 0)
+ return ret;
+ go_maxspeed_load = val;
+ return count;
}
static struct global_attr go_maxspeed_load_attr = __ATTR(go_maxspeed_load, 0644,
static ssize_t store_min_sample_time(struct kobject *kobj,
struct attribute *attr, const char *buf, size_t count)
{
- return strict_strtoul(buf, 0, &min_sample_time);
+ int ret;
+ unsigned long val;
+
+ ret = strict_strtoul(buf, 0, &val);
+ if (ret < 0)
+ return ret;
+ min_sample_time = val;
+ return count;
}
static struct global_attr min_sample_time_attr = __ATTR(min_sample_time, 0644,