dmaengine: k3dma: add missing clk_disable_unprepare() on error in k3_dma_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 19 Jul 2016 11:29:41 +0000 (11:29 +0000)
committerVinod Koul <vinod.koul@intel.com>
Sun, 24 Jul 2016 06:29:15 +0000 (11:59 +0530)
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>
drivers/dma/k3dma.c

index 35961af6e4d7261806134c3144a189680cfc0dd3..563affd5cd06eec99172dedafe65b714cea7d283 100644 (file)
@@ -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;
 }