From: roel kluin Date: Tue, 21 Oct 2008 04:36:44 +0000 (-0400) Subject: USB: usbtest.c: length, sglen and vary are unsigned, so cannot be negative X-Git-Tag: v2.6.28-rc1~33^2~7 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8aafdf6a1528b0672a0527be473d9be5a12289d3;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index b358c4e1cf2..444c69c447b 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))