Commit 958b9fa7 authored by John Youn's avatar John Youn Committed by Felipe Balbi

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: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 71f7e702
...@@ -496,7 +496,7 @@ static int dwc3_ep0_handle_feature(struct dwc3 *dwc, ...@@ -496,7 +496,7 @@ static int dwc3_ep0_handle_feature(struct dwc3 *dwc,
case USB_RECIP_ENDPOINT: case USB_RECIP_ENDPOINT:
switch (wValue) { switch (wValue) {
case USB_ENDPOINT_HALT: case USB_ENDPOINT_HALT:
dep = dwc3_wIndex_to_dep(dwc, wIndex); dep = dwc3_wIndex_to_dep(dwc, ctrl->wIndex);
if (!dep) if (!dep)
return -EINVAL; return -EINVAL;
if (set == 0 && (dep->flags & DWC3_EP_WEDGE)) if (set == 0 && (dep->flags & DWC3_EP_WEDGE))
......
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