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

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

Merge "xhci: Avoid NULL pointer deref when host dies."

parents cc7d28cf eaf56d61
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1189,9 +1189,6 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
	}

	xhci = hcd_to_xhci(hcd);
	if (xhci->xhc_state & XHCI_STATE_HALTED)
		return -ENODEV;

	if (check_virt_dev) {
		if (!udev->slot_id || !xhci->devs[udev->slot_id]) {
			printk(KERN_DEBUG "xHCI %s called with unaddressed "
@@ -1207,6 +1204,9 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
		}
	}

	if (xhci->xhc_state & XHCI_STATE_HALTED)
		return -ENODEV;

	return 1;
}