commit | d6dc2e76a860d6be0129daae43e5f12461531d20 | [log] [tgz] |
---|---|---|
author | Felipe Balbi <felipe.balbi@linux.intel.com> | Mon May 30 13:42:33 2016 +0300 |
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | Mon Jun 20 12:32:51 2016 +0300 |
tree | 8191f3234cfbae2ab770f40b8f0b7272ff8343c1 | |
parent | ba62c09d5cc240e55eb39e92d88f1036bb1d9221 [diff] [blame] |
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>
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3d2978c..d2884a4 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c
@@ -924,7 +924,7 @@ chain = false; } - if (!trbs_left) + if (!trbs_left--) last = true; if (last)