提交 f54fa84d 编写于 作者: O Orjan Friberg 提交者: Greg Kroah-Hartman

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: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 2011e924
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册