diff mbox

[rebased,2/2] spi: rspi: Add missing clk_disable() calls in error and cleanup paths

Message ID 1389691233-29890-2-git-send-email-geert@linux-m68k.org (mailing list archive)
State Accepted
Commit fcb4ed749c776a2ae89ca40343cbccb6f8981e60
Headers show

Commit Message

Geert Uytterhoeven Jan. 14, 2014, 9:20 a.m. UTC
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
Rebased on top of linux-spi/for-next

 drivers/spi/spi-rspi.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Mark Brown Jan. 14, 2014, 2:15 p.m. UTC | #1
On Tue, Jan 14, 2014 at 10:20:33AM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 1f8fb32d59fd..cb8a1a4ee700 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -918,6 +918,7 @@  static int rspi_remove(struct platform_device *pdev)
 	struct rspi_data *rspi = platform_get_drvdata(pdev);
 
 	rspi_release_dma(rspi);
+	clk_disable(rspi->clk);
 
 	return 0;
 }
@@ -992,28 +993,30 @@  static int rspi_probe(struct platform_device *pdev)
 			       dev_name(&pdev->dev), rspi);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "request_irq error\n");
-		goto error1;
+		goto error2;
 	}
 
 	rspi->irq = irq;
 	ret = rspi_request_dma(rspi, pdev);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "rspi_request_dma failed.\n");
-		goto error2;
+		goto error3;
 	}
 
 	ret = devm_spi_register_master(&pdev->dev, master);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "spi_register_master error.\n");
-		goto error2;
+		goto error3;
 	}
 
 	dev_info(&pdev->dev, "probed\n");
 
 	return 0;
 
-error2:
+error3:
 	rspi_release_dma(rspi);
+error2:
+	clk_disable(rspi->clk);
 error1:
 	spi_master_put(master);