From: Jan Andersson Date: Tue, 8 Jan 2008 15:39:49 +0000 (+0100) Subject: usb: fix usbtest halt check on big endian systems X-Git-Tag: v2.6.25-rc1~1075^2~110 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ce4560a39f72e45a273c652ee116f8b0fc6386f;p=linux-2.6 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 Signed-off-by: Jan Andersson Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index ea31621464..81755d06a4 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -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;