diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2013-10-16 06:50:07 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-10-17 12:31:51 -0400 |
commit | 8d1aad7485e653c2c5fd985b326096f680f7d918 (patch) | |
tree | 67db34c0f82fcfe41f433ffc34f7f51d4015b36b /drivers/usb/musb | |
parent | 0d2dd7eaed1dac07b266ca2c662ff4a184a3060f (diff) |
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>
Diffstat (limited to 'drivers/usb/musb')
-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) | |||
1764 | free_irq(musb->nIrq, musb); | 1764 | free_irq(musb->nIrq, musb); |
1765 | } | 1765 | } |
1766 | cancel_work_sync(&musb->irq_work); | 1766 | cancel_work_sync(&musb->irq_work); |
1767 | if (musb->dma_controller) | ||
1768 | dma_controller_destroy(musb->dma_controller); | ||
1769 | 1767 | ||
1770 | musb_host_free(musb); | 1768 | musb_host_free(musb); |
1771 | } | 1769 | } |
@@ -1990,6 +1988,9 @@ static int musb_remove(struct platform_device *pdev) | |||
1990 | musb_exit_debugfs(musb); | 1988 | musb_exit_debugfs(musb); |
1991 | musb_shutdown(pdev); | 1989 | musb_shutdown(pdev); |
1992 | 1990 | ||
1991 | if (musb->dma_controller) | ||
1992 | dma_controller_destroy(musb->dma_controller); | ||
1993 | |||
1993 | musb_free(musb); | 1994 | musb_free(musb); |
1994 | device_init_wakeup(dev, 0); | 1995 | device_init_wakeup(dev, 0); |
1995 | return 0; | 1996 | return 0; |