Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89b90c09 authored by Wei Yongjun's avatar Wei Yongjun Committed by Vinod Koul
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent e94570a3
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -757,7 +757,7 @@ static int k3_dma_probe(struct platform_device *op)


	ret = dma_async_device_register(&d->slave);
	ret = dma_async_device_register(&d->slave);
	if (ret)
	if (ret)
		return ret;
		goto dma_async_register_fail;


	ret = of_dma_controller_register((&op->dev)->of_node,
	ret = of_dma_controller_register((&op->dev)->of_node,
					k3_of_dma_simple_xlate, d);
					k3_of_dma_simple_xlate, d);
@@ -774,6 +774,8 @@ static int k3_dma_probe(struct platform_device *op)


of_dma_register_fail:
of_dma_register_fail:
	dma_async_device_unregister(&d->slave);
	dma_async_device_unregister(&d->slave);
dma_async_register_fail:
	clk_disable_unprepare(d->clk);
	return ret;
	return ret;
}
}