summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/ep0.c
diff options
context:
space:
mode:
authorJohn Youn <johnyoun@synopsys.com>2016-05-23 11:32:38 -0700
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-06-20 12:32:42 +0300
commit958b9fa7f8cfd5799534e98ba3d05d96a5e7ccb9 (patch)
treeaf814b5cc4822a7afdfab00c5bc8e7e9ced00996 /drivers/usb/dwc3/ep0.c
parent71f7e7027028d5a8ef15dccc587dbd6c6b7f544f (diff)
downloadlinux-stable-958b9fa7f8cfd5799534e98ba3d05d96a5e7ccb9.tar.gz
linux-stable-958b9fa7f8cfd5799534e98ba3d05d96a5e7ccb9.tar.bz2
linux-stable-958b9fa7f8cfd5799534e98ba3d05d96a5e7ccb9.zip
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 <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/ep0.c')
-rw-r--r--drivers/usb/dwc3/ep0.c2
1 files changed, 1 insertions, 1 deletions
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))