diff options
author | Orjan Friberg <orjan.friberg@axis.com> | 2006-08-09 02:31:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-11 17:06:06 -0400 |
commit | f54fa84dda211f68f65002efa44142207c886c79 (patch) | |
tree | 117113e866346afa5737a78ba3ba2085b059aab1 /drivers/usb/misc | |
parent | 2011e9249a252e0655807fbe6841f6cfe6b6c197 (diff) |
USB: usbtest.c: unsigned retval makes ctrl_out return 0 in case of error
In my quest to try and figure out why test 14 (control write) doesn't
work with my EZ-USB board, I noticed that sometimes testusb reported
no error even though the kernel log complained "byte 0 is 0 not 2" etc.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/usbtest.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 786e1dbe88ec..983e104dd452 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -1242,11 +1242,12 @@ done: | |||
1242 | static int ctrl_out (struct usbtest_dev *dev, | 1242 | static int ctrl_out (struct usbtest_dev *dev, |
1243 | unsigned count, unsigned length, unsigned vary) | 1243 | unsigned count, unsigned length, unsigned vary) |
1244 | { | 1244 | { |
1245 | unsigned i, j, len, retval; | 1245 | unsigned i, j, len; |
1246 | int retval; | ||
1246 | u8 *buf; | 1247 | u8 *buf; |
1247 | char *what = "?"; | 1248 | char *what = "?"; |
1248 | struct usb_device *udev; | 1249 | struct usb_device *udev; |
1249 | 1250 | ||
1250 | if (length < 1 || length > 0xffff || vary >= length) | 1251 | if (length < 1 || length > 0xffff || vary >= length) |
1251 | return -EINVAL; | 1252 | return -EINVAL; |
1252 | 1253 | ||