浏览代码

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>
John Youn 9 年之前
父节点
当前提交
958b9fa7f8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/dwc3/ep0.c

+ 1 - 1
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))