]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: chipidea: cleanup dma_pool if udc_start() fails
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 12 Sep 2012 11:58:03 +0000 (14:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Sep 2012 17:58:38 +0000 (10:58 -0700)
commitad6b1b97fe8504957d017cd6e4168cac8903d3f3
treebf7cafbf1e642286cfb9390b5e0b5449a3ae466e
parentc9d1f947a85e38b6dded469470c95ed62430cb3f
usb: chipidea: cleanup dma_pool if udc_start() fails

If udc_start() fails the qh_pool dma-pool cannot be closed because
it's still in use. This patch factors out the dma_pool_free() loop
into destroy_eps() and calls it in the error path of udc_start(),
too.

Cc: stable <stable@vger.kernel.org>
Reviewed-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c