usb: musb: core: Call dma_controller_destroy() in error path only once.

In commit f3ce4d5 ("usb: musb: core: call dma_controller_destroy() in the err path")
I erroneously assumed that the dma controller is not removed in the
error patch. This was wrong because it happens later via musb_free().
That means the original commit can be reverted because it is wrong or we
do this, so it is more obvious.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
此提交包含在:
Sebastian Andrzej Siewior
2013-10-16 12:50:07 +02:00
提交者 Felipe Balbi
父節點 0d2dd7eaed
當前提交 8d1aad7485

查看文件

@@ -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;