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

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

Merge "usb: dwc3: Avoid NULL pointer access"

parents 0c91c7aa cca3d0b7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1088,7 +1088,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;