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

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

Merge "usb: host: xhci: Add NULL check in xhci_find_slot_id_by_port API"

parents b73f303f a8560708
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -366,7 +366,7 @@ int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,


	slot_id = 0;
	slot_id = 0;
	for (i = 0; i < MAX_HC_SLOTS; i++) {
	for (i = 0; i < MAX_HC_SLOTS; i++) {
		if (!xhci->devs[i])
		if (!xhci->devs[i] || !xhci->devs[i]->udev)
			continue;
			continue;
		speed = xhci->devs[i]->udev->speed;
		speed = xhci->devs[i]->udev->speed;
		if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3))
		if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3))