usb: dwc3: gadget: decrement trbs_left for each sg entry
If we don't, we will overwrite valid TRBs. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
@@ -924,7 +924,7 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep,
|
|||||||
chain = false;
|
chain = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!trbs_left)
|
if (!trbs_left--)
|
||||||
last = true;
|
last = true;
|
||||||
|
|
||||||
if (last)
|
if (last)
|
||||||
|
Reference in New Issue
Block a user