staging: line6: Convert simple_strtoul to strict_strtoul in midi.c
authorShawn Bohrer <shawn.bohrer@gmail.com>
Mon, 16 Nov 2009 04:18:02 +0000 (22:18 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 20:21:48 +0000 (12:21 -0800)
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/line6/midi.c

index 89a2b17e9cafc78744752ae41edcc062184db98b..6ef4455d87d8754b1ae6d1f3f7046316f80517a9 100644 (file)
@@ -318,7 +318,13 @@ static ssize_t midi_set_midi_mask_transmit(struct device *dev,
 {
        struct usb_interface *interface = to_usb_interface(dev);
        struct usb_line6 *line6 = usb_get_intfdata(interface);
-       int value = simple_strtoul(buf, NULL, 10);
+       unsigned long value;
+       int ret;
+
+       ret = strict_strtoul(buf, 10, &value);
+       if (ret)
+               return ret;
+
        line6->line6midi->midi_mask_transmit = value;
        return count;
 }
@@ -344,7 +350,13 @@ static ssize_t midi_set_midi_mask_receive(struct device *dev,
 {
        struct usb_interface *interface = to_usb_interface(dev);
        struct usb_line6 *line6 = usb_get_intfdata(interface);
-       int value = simple_strtoul(buf, NULL, 10);
+       unsigned long value;
+       int ret;
+
+       ret = strict_strtoul(buf, 10, &value);
+       if (ret)
+               return ret;
+
        line6->line6midi->midi_mask_receive = value;
        return count;
 }