Message ID | 1468927781-648-1-git-send-email-weiyj_lk@163.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Tue, Jul 19, 2016 at 11:29:41AM +0000, Wei Yongjun wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > Add the missing clk_disable_unprepare() before return > from k3_dma_probe() in the error handling case. Applied, thanks
diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index 9364dac..39de898 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -760,7 +760,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); @@ -777,6 +777,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; }