diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 6203ad38e913..7fd213785d52 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1764,8 +1764,6 @@ static void musb_free(struct musb *musb) free_irq(musb->nIrq, musb); } cancel_work_sync(&musb->irq_work); - if (musb->dma_controller) - dma_controller_destroy(musb->dma_controller); musb_host_free(musb); } @@ -1990,6 +1988,9 @@ static int musb_remove(struct platform_device *pdev) musb_exit_debugfs(musb); musb_shutdown(pdev); + if (musb->dma_controller) + dma_controller_destroy(musb->dma_controller); + musb_free(musb); device_init_wakeup(dev, 0); return 0; |