usb: chipidea: udc: fix memory leak in _ep_nuke
authorMichael Grzeschik <[email protected]>
Thu, 4 Apr 2013 10:13:47 +0000 (13:13 +0300)
committerGreg Kroah-Hartman <[email protected]>
Fri, 5 Apr 2013 21:09:12 +0000 (14:09 -0700)
commit7ca2cd291fd84ae499390f227a255ccba2780a81
tree2ba98c5b51618154fb741882d2fa5a7ec8a1f612
parenta9c174302b1590ef3ead485d804a303c5f89174b
usb: chipidea: udc: fix memory leak in _ep_nuke

In hardware_enqueue code adds one extra td with dma_pool_alloc if
mReq->req.zero is true. When _ep_nuke will be called for that endpoint,
dma_pool_free will not be called to free that memory again. That patch
fixes this.

Cc: stable <[email protected]> # v3.5
Signed-off-by: Michael Grzeschik <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/chipidea/udc.c