Michael Grzeschik <m.grzesc...@pengutronix.de> writes:

> 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.

Okay, drop the "possible" from subject and you're good to go.

Acked-by: Alexander Shishkin <alexander.shish...@linux.intel.com>

>
> Cc: stable <sta...@vger.kernel.org>
> Signed-off-by: Michael Grzeschik <m.grzesc...@pengutronix.de>
> ---
>  drivers/usb/chipidea/udc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index b40c259..a0a0a64 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -564,6 +564,12 @@ __acquires(mEp->lock)
>               struct ci13xxx_req *mReq = \
>                       list_entry(mEp->qh.queue.next,
>                                  struct ci13xxx_req, queue);
> +
> +             if (mReq->zptr) {
> +                     dma_pool_free(mEp->td_pool, mReq->zptr, mReq->zdma);
> +                     mReq->zptr = NULL;
> +             }
> +
>               list_del_init(&mReq->queue);
>               mReq->req.status = -ESHUTDOWN;
>  
> -- 
> 1.8.2.rc2
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to