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

Commit 5538512d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "usb: host: Fix array access to a non verified index""

parents 1a4b0360 8a0ad64f
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -881,19 +881,14 @@ static int ehci_hub_control (
) {
	struct ehci_hcd	*ehci = hcd_to_ehci (hcd);
	int		ports = HCS_N_PORTS (ehci->hcs_params);
	u32 __iomem	*status_reg;
	u32 __iomem	*hostpc_reg;
	u32 __iomem	*status_reg = &ehci->regs->port_status[
				(wIndex & 0xff) - 1];
	u32 __iomem	*hostpc_reg = &ehci->regs->hostpc[(wIndex & 0xff) - 1];
	u32		temp, temp1, status;
	unsigned long	flags;
	int		retval = 0;
	unsigned	selector;

	if ((wIndex & 0xff) == 0x0)
		return -EINVAL;

	status_reg = &ehci->regs->port_status[(wIndex & 0xff) - 1];
	hostpc_reg = &ehci->regs->hostpc[(wIndex & 0xff) - 1];

	/*
	 * FIXME:  support SetPortFeatures USB_PORT_FEAT_INDICATOR.
	 * HCS_INDICATOR may say we can change LEDs to off/amber/green.