aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/net2280.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index 7682c07035b..6a4b93ad108 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -2241,7 +2241,8 @@ static void handle_ep_small (struct net2280_ep *ep)
if (likely (req)) {
req->td->dmacount = 0;
t = readl (&ep->regs->ep_avail);
- dma_done (ep, req, count, t);
+ dma_done (ep, req, count,
+ (ep->out_overflow || t) ? -EOVERFLOW : 0);
}
/* also flush to prevent erratum 0106 trouble */