If trbs_left == 0, we don't have any space left in the TRB ring so don't
prepare anything.
Change-Id: I1dc6c665b778a7988fca9cd890884ad27dc830ef
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit
89bc856e5a7462e47d90d5a3f5396bd5795efd0c)
BUILD_BUG_ON_NOT_POWER_OF_2(DWC3_TRB_NUM);
trbs_left = dwc3_calc_trbs_left(dep);
+ if (!trbs_left)
+ return;
list_for_each_entry_safe(req, n, &dep->pending_list, list) {
if (req->request.num_mapped_sgs > 0)