Commit 6ce4560a authored by Jan Andersson's avatar Jan Andersson Committed by Greg Kroah-Hartman

usb: fix usbtest halt check on big endian systems

usbtest did not swap the received status information when checking for
a non-zero value and failed to discover halted endpoints on big endian
systems.

Cc: stable <stable@kernel.org>
Signed-off-by: default avatarJan Andersson <jan@gaisler.com>
Acked-by: default avatarDavid Brownell <david-b@pacbell.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4b24f91c
......@@ -1151,6 +1151,7 @@ static int verify_halted (int ep, struct urb *urb)
dbg ("ep %02x couldn't get halt status, %d", ep, retval);
return retval;
}
le16_to_cpus(&status);
if (status != 1) {
dbg ("ep %02x bogus status: %04x != 1", ep, status);
return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment