Commit bb950a16 authored by Shawn Bohrer's avatar Shawn Bohrer Committed by Greg Kroah-Hartman

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

Signed-off-by: default avatarShawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment