提交 bb950a16 编写于 作者: S Shawn Bohrer 提交者: Greg Kroah-Hartman

staging: line6: Convert simple_strtol to strict_strtol in toneport.c

Signed-off-by: NShawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 63a4a8ba
......@@ -96,8 +96,14 @@ static ssize_t toneport_set_led_red(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
char *c;
led_red = simple_strtol(buf, &c, 10);
int retval;
long value;
retval = strict_strtol(buf, 10, &value);
if (retval)
return retval;
led_red = value;
toneport_update_led(dev);
return count;
}
......@@ -106,8 +112,14 @@ static ssize_t toneport_set_led_green(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
char *c;
led_green = simple_strtol(buf, &c, 10);
int retval;
long value;
retval = strict_strtol(buf, 10, &value);
if (retval)
return retval;
led_green = value;
toneport_update_led(dev);
return count;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册