staging: frontier: switch to strict_strtoul in tranzport.c
authorEli Lindsey <eli@siliconsprawl.com>
Tue, 9 Mar 2010 06:15:32 +0000 (00:15 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:35:33 +0000 (11:35 -0700)
This is a patch to tranzport.c that changes a use of simple_strtoul to
strict_strtoul at the suggestion of checkpatch.pl

Signed-off-by: Eli Lindsey <eli@siliconsprawl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/frontier/tranzport.c

index 1f91001b134779456079703c2427b33fa0556612..f9ab4f32daa81f134e6f6ce5407c1cf9240cd50d 100644 (file)
@@ -198,7 +198,9 @@ static void usb_tranzport_abort_transfers(struct usb_tranzport *dev)
   {                                                                    \
     struct usb_interface *intf = to_usb_interface(dev);                        \
     struct usb_tranzport *t = usb_get_intfdata(intf);                  \
-    int temp = simple_strtoul(buf, NULL, 10);                          \
+    unsigned long temp;                                                        \
+    if (strict_strtoul(buf, 10, &temp))                                        \
+       return -EINVAL;                                                 \
     t->value = temp;                                                   \
     return count;                                                      \
   }                                                                    \