diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2016-07-19 11:29:41 +0000 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-07-24 11:59:15 +0530 |
commit | 89b90c09b5d505dcff1068054f1fc2d2704e909f (patch) | |
tree | 758e4c116e95f797d63aa09d55a42e216dd1d2ba /drivers/dma | |
parent | e94570a36bda79b9f87abd283d7277b6a92c508d (diff) | |
download | linux-89b90c09b5d505dcff1068054f1fc2d2704e909f.tar.gz linux-89b90c09b5d505dcff1068054f1fc2d2704e909f.tar.bz2 linux-89b90c09b5d505dcff1068054f1fc2d2704e909f.zip |
dmaengine: k3dma: add missing clk_disable_unprepare() on error in k3_dma_probe()
Add the missing clk_disable_unprepare() before return
from k3_dma_probe() in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/k3dma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index 35961af6e4d7..563affd5cd06 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -757,7 +757,7 @@ static int k3_dma_probe(struct platform_device *op) ret = dma_async_device_register(&d->slave); if (ret) - return ret; + goto dma_async_register_fail; ret = of_dma_controller_register((&op->dev)->of_node, k3_of_dma_simple_xlate, d); @@ -774,6 +774,8 @@ static int k3_dma_probe(struct platform_device *op) of_dma_register_fail: dma_async_device_unregister(&d->slave); +dma_async_register_fail: + clk_disable_unprepare(d->clk); return ret; } |