summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-rspi.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>2014-01-14 13:20:33 +0400
committerMark Brown <broonie@linaro.org>2014-01-14 18:14:54 +0400
commitfcb4ed749c776a2ae89ca40343cbccb6f8981e60 (patch)
tree9193c7a73185316e5bdd23429bf52023c7c73102 /drivers/spi/spi-rspi.c
parent13ea3300100ec3461560b1e061033cd167333a86 (diff)
downloadlinux-fcb4ed749c776a2ae89ca40343cbccb6f8981e60.tar.xz
spi: rspi: Add missing clk_disable() calls in error and cleanup paths
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-rspi.c')
-rw-r--r--drivers/spi/spi-rspi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 587722495cf2..7838b7e71910 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -925,6 +925,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;
}
@@ -999,28 +1000,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);