From: John Youn Date: Mon, 23 May 2016 18:32:38 +0000 (-0700) Subject: usb: dwc3: ep0: Fix endianness of wIndex passed to dwc3_wIndex_to_dep X-Git-Tag: v4.8-rc1~191^2~23^2~74 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=958b9fa7f8cfd5799534e98ba3d05d96a5e7ccb9;p=linux.git 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. Signed-off-by: John Youn Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 54628c37b21f..c814dde27138 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -496,7 +496,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))