Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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))