[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1519831218.216568476@decadent.org.uk>
Date: Wed, 28 Feb 2018 15:20:18 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Vinod Koul" <vinod.koul@...el.com>,
"Tobias Jordan" <Tobias.Jordan@...ktrobit.com>
Subject: [PATCH 3.16 084/254] dmaengine: jz4740: disable/unprepare clk if
probe fails
3.16.55-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Tobias Jordan <Tobias.Jordan@...ktrobit.com>
commit eb9436966fdc84cebdf222952a99898ab46d9bb0 upstream.
in error path of jz4740_dma_probe(), call clk_disable_unprepare() to clean
up.
Found by Linux Driver Verification project (linuxtesting.org).
Fixes: 25ce6c35fea0 MIPS: jz4740: Remove custom DMA API
Signed-off-by: Tobias Jordan <Tobias.Jordan@...ktrobit.com>
Signed-off-by: Vinod Koul <vinod.koul@...el.com>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/dma/dma-jz4740.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/dma/dma-jz4740.c
+++ b/drivers/dma/dma-jz4740.c
@@ -574,7 +574,7 @@ static int jz4740_dma_probe(struct platf
ret = dma_async_device_register(dd);
if (ret)
- return ret;
+ goto err_clk;
irq = platform_get_irq(pdev, 0);
ret = request_irq(irq, jz4740_dma_irq, 0, dev_name(&pdev->dev), dmadev);
@@ -587,6 +587,8 @@ static int jz4740_dma_probe(struct platf
err_unregister:
dma_async_device_unregister(dd);
+err_clk:
+ clk_disable_unprepare(dmadev->clk);
return ret;
}
Powered by blists - more mailing lists