mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
Merge "usb: xhci: Avoid NULL pointer access of sec event ring"
This commit is contained in:
commit
16c10b79ca
1 changed files with 5 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue