UPSTREAM: usb: dwc3: gadget: Don't prepare TRBs if no space
authorJohn Youn <johnyoun@synopsys.com>
Fri, 20 May 2016 00:26:10 +0000 (17:26 -0700)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commitf906253bf08ba2aafbc0f6e907c580473e923bb2
treeeceec47aa6f8452feb5d4d7fc59a4e38f09a9723
parent39298655f88b3a951512a120be82502d59746a83
UPSTREAM: usb: dwc3: gadget: Don't prepare TRBs if no space

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)
drivers/usb/dwc3/gadget.c