diff options
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 69425b3cb6b7..9d2b673f90e3 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1321,6 +1321,7 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req) | |||
1321 | struct ci_hw_ep *hwep = container_of(ep, struct ci_hw_ep, ep); | 1321 | struct ci_hw_ep *hwep = container_of(ep, struct ci_hw_ep, ep); |
1322 | struct ci_hw_req *hwreq = container_of(req, struct ci_hw_req, req); | 1322 | struct ci_hw_req *hwreq = container_of(req, struct ci_hw_req, req); |
1323 | unsigned long flags; | 1323 | unsigned long flags; |
1324 | struct td_node *node, *tmpnode; | ||
1324 | 1325 | ||
1325 | if (ep == NULL || req == NULL || hwreq->req.status != -EALREADY || | 1326 | if (ep == NULL || req == NULL || hwreq->req.status != -EALREADY || |
1326 | hwep->ep.desc == NULL || list_empty(&hwreq->queue) || | 1327 | hwep->ep.desc == NULL || list_empty(&hwreq->queue) || |
@@ -1331,6 +1332,12 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req) | |||
1331 | 1332 | ||
1332 | hw_ep_flush(hwep->ci, hwep->num, hwep->dir); | 1333 | hw_ep_flush(hwep->ci, hwep->num, hwep->dir); |
1333 | 1334 | ||
1335 | list_for_each_entry_safe(node, tmpnode, &hwreq->tds, td) { | ||
1336 | dma_pool_free(hwep->td_pool, node->ptr, node->dma); | ||
1337 | list_del(&node->td); | ||
1338 | kfree(node); | ||
1339 | } | ||
1340 | |||
1334 | /* pop request */ | 1341 | /* pop request */ |
1335 | list_del_init(&hwreq->queue); | 1342 | list_del_init(&hwreq->queue); |
1336 | 1343 | ||