mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
UPSTREAM: usb: dwc3: gadget: decrement trbs_left for each sg entry
If we don't, we will overwrite valid TRBs.
Change-Id: I8076fa857b9ae016617d58836de3d9dcf5be9e4c
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit d6dc2e76a8)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user