summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorShawn Bohrer <shawn.bohrer@gmail.com>2009-11-15 22:17:59 -0600
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 12:21:47 -0800
commitbb950a169d98ac9a2b8a899f95ed5d784c14f3cc (patch)
tree0004a5095140f27591a29c86c54609094bd03d66 /drivers/staging
parent63a4a8bad9715421e9efdfba6455c7a25d1be6e7 (diff)
staging: line6: Convert simple_strtol to strict_strtol in toneport.c
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/line6/toneport.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c
index 84bf29c3351..e6770ea1793 100644
--- a/drivers/staging/line6/toneport.c
+++ b/drivers/staging/line6/toneport.c
@@ -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;
}