提交 d6dc2e76 编写于 作者: F Felipe Balbi

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

If we don't, we will overwrite valid TRBs.
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 ba62c09d
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册