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)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 20 Jun 2016 09:32:44 +0000 (12:32 +0300)
commit89bc856e5a7462e47d90d5a3f5396bd5795efd0c
treedc101f2c6543e6e8f46dc5b696bb9aa81cc0824e
parent0d25744ad107b6c9010153f3ebf8b59672b5b8e7
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.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c