mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
1460e5e44c
commit
8aafdf6a15
1 changed files with 1 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue