Skip to content

Commit

Permalink
USB: usbtest.c: unsigned retval makes ctrl_out return 0 in case of error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Orjan Friberg authored and Greg Kroah-Hartman committed Aug 11, 2006
1 parent 2011e92 commit f54fa84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/misc/usbtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,11 +1242,12 @@ static int halt_simple (struct usbtest_dev *dev)
static int ctrl_out (struct usbtest_dev *dev,
unsigned count, unsigned length, unsigned vary)
{
unsigned i, j, len, retval;
unsigned i, j, len;
int retval;
u8 *buf;
char *what = "?";
struct usb_device *udev;

if (length < 1 || length > 0xffff || vary >= length)
return -EINVAL;

Expand Down

0 comments on commit f54fa84

Please sign in to comment.