]> git.hungrycats.org Git - linux/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>
Tue, 2 Oct 2012 17:40:02 +0000 (10:40 -0700)
commit6b8b3d7b9720603433f7ab99a114a2f3e1453c71
tree19a2e170d0eccf002060ecbdd86871bdd349fc47
parentb739070c21f7279c4e508d4af7c5752b345966cb
usb: chipidea: cleanup dma_pool if udc_start() fails

commit ad6b1b97fe8504957d017cd6e4168cac8903d3f3 upstream.

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.

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>
[mkl: backport to v3.5]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/usb/chipidea/udc.c