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

Commit 16c10b79 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: xhci: Avoid NULL pointer access of sec event ring"

parents 869d6b0b c9344671
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1923,6 +1923,11 @@ static int sec_event_ring_cleanup(struct xhci_hcd *xhci, unsigned int intr_num)
		return -EINVAL;
	}

	if (!xhci->sec_erst) {
		xhci_err(xhci, "secondary ring is NULL or not initialized\n");
		return -EINVAL;
	}

	size =
	sizeof(struct xhci_erst_entry)*(xhci->sec_erst[intr_num].num_entries);
	if (xhci->sec_erst[intr_num].entries) {