summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/usbtest.c
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2008-10-21 08:36:44 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-22 21:05:28 +0400
commit8aafdf6a1528b0672a0527be473d9be5a12289d3 (patch)
treea2fcd648b5c17b554f8197f0f5d4fd6fe172c954 /drivers/usb/misc/usbtest.c
parent1460e5e44cc5ecad7704f63b10dcb3a59d0e008b (diff)
downloadlinux-8aafdf6a1528b0672a0527be473d9be5a12289d3.tar.xz
USB: usbtest.c: length, sglen and vary are unsigned, so cannot be negative
length, sglen and vary are unsigned, so cannot be negative see vi drivers/usb/misc/usbtest.c +18 struct usbtest_param { ... unsigned iterations; unsigned length; unsigned vary; unsigned sglen; ... }; Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r--drivers/usb/misc/usbtest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index b358c4e1cf21..444c69c447be 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1561,8 +1561,7 @@ usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf)
if (code != USBTEST_REQUEST)
return -EOPNOTSUPP;
- if (param->iterations <= 0 || param->length < 0
- || param->sglen < 0 || param->vary < 0)
+ if (param->iterations <= 0)
return -EINVAL;
if (mutex_lock_interruptible(&dev->lock))