mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
Merge "usb: dwc3: Avoid NULL pointer access in dwc3_calc_trbs_left"
This commit is contained in:
commit
6d73fbad77
1 changed files with 1 additions and 1 deletions
|
|
@ -1002,7 +1002,7 @@ static u32 dwc3_calc_trbs_left(struct dwc3_ep *dep)
|
|||
*/
|
||||
if (dep->trb_enqueue == dep->trb_dequeue) {
|
||||
tmp = dwc3_ep_prev_trb(dep, dep->trb_enqueue);
|
||||
if (tmp->ctrl & DWC3_TRB_CTRL_HWO)
|
||||
if (!tmp || tmp->ctrl & DWC3_TRB_CTRL_HWO)
|
||||
return 0;
|
||||
|
||||
return DWC3_TRB_NUM - 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue