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

Commit d6dc2e76 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: dwc3: gadget: decrement trbs_left for each sg entry



If we don't, we will overwrite valid TRBs.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent ba62c09d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -924,7 +924,7 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep,
			chain = false;
		}

		if (!trbs_left)
		if (!trbs_left--)
			last = true;

		if (last)