From: John Youn Date: Mon, 23 May 2016 18:32:38 +0000 (-0700) Subject: UPSTREAM: usb: dwc3: ep0: Fix endianness of wIndex passed to dwc3_wIndex_to_dep X-Git-Tag: firefly_0821_release~1809 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=caab0bad3bc1ee0510ab0571edf062cbe9af67ec;p=firefly-linux-kernel-4.4.55.git UPSTREAM: usb: dwc3: ep0: Fix endianness of wIndex passed to dwc3_wIndex_to_dep The wIndex passed in here is CPU endianness, but the function expects little endian. Found with sparse. Change-Id: Ib33f0b9b4e8c3320eb590496460e2cc7274b6a0e Signed-off-by: John Youn Signed-off-by: Felipe Balbi Signed-off-by: Wu Liang feng (cherry picked from commit 958b9fa7f8cfd5799534e98ba3d05d96a5e7ccb9) --- diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index dfe3ec71c7f3..0dc057500ff2 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -493,7 +493,7 @@ static int dwc3_ep0_handle_feature(struct dwc3 *dwc, case USB_RECIP_ENDPOINT: switch (wValue) { case USB_ENDPOINT_HALT: - dep = dwc3_wIndex_to_dep(dwc, wIndex); + dep = dwc3_wIndex_to_dep(dwc, ctrl->wIndex); if (!dep) return -EINVAL; if (set == 0 && (dep->flags & DWC3_EP_WEDGE))