diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-05-30 13:42:33 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-06-20 12:32:51 +0300 |
commit | d6dc2e76a860d6be0129daae43e5f12461531d20 (patch) | |
tree | 8191f3234cfbae2ab770f40b8f0b7272ff8343c1 /drivers/usb/dwc3 | |
parent | ba62c09d5cc240e55eb39e92d88f1036bb1d9221 (diff) | |
download | blackbird-op-linux-d6dc2e76a860d6be0129daae43e5f12461531d20.tar.gz blackbird-op-linux-d6dc2e76a860d6be0129daae43e5f12461531d20.zip |
usb: dwc3: gadget: decrement trbs_left for each sg entry
If we don't, we will overwrite valid TRBs.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3d2978cebdff..d2884a414e20 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -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) |