diff options
author | Geert Uytterhoeven <geert+renesas@linux-m68k.org> | 2014-01-14 04:20:33 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-14 09:14:54 -0500 |
commit | fcb4ed749c776a2ae89ca40343cbccb6f8981e60 (patch) | |
tree | 9193c7a73185316e5bdd23429bf52023c7c73102 /drivers/spi/spi-rspi.c | |
parent | 13ea3300100ec3461560b1e061033cd167333a86 (diff) |
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.c | 11 |
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) | |||
925 | struct rspi_data *rspi = platform_get_drvdata(pdev); | 925 | struct rspi_data *rspi = platform_get_drvdata(pdev); |
926 | 926 | ||
927 | rspi_release_dma(rspi); | 927 | rspi_release_dma(rspi); |
928 | clk_disable(rspi->clk); | ||
928 | 929 | ||
929 | return 0; | 930 | return 0; |
930 | } | 931 | } |
@@ -999,28 +1000,30 @@ static int rspi_probe(struct platform_device *pdev) | |||
999 | dev_name(&pdev->dev), rspi); | 1000 | dev_name(&pdev->dev), rspi); |
1000 | if (ret < 0) { | 1001 | if (ret < 0) { |
1001 | dev_err(&pdev->dev, "request_irq error\n"); | 1002 | dev_err(&pdev->dev, "request_irq error\n"); |
1002 | goto error1; | 1003 | goto error2; |
1003 | } | 1004 | } |
1004 | 1005 | ||
1005 | rspi->irq = irq; | 1006 | rspi->irq = irq; |
1006 | ret = rspi_request_dma(rspi, pdev); | 1007 | ret = rspi_request_dma(rspi, pdev); |
1007 | if (ret < 0) { | 1008 | if (ret < 0) { |
1008 | dev_err(&pdev->dev, "rspi_request_dma failed.\n"); | 1009 | dev_err(&pdev->dev, "rspi_request_dma failed.\n"); |
1009 | goto error2; | 1010 | goto error3; |
1010 | } | 1011 | } |
1011 | 1012 | ||
1012 | ret = devm_spi_register_master(&pdev->dev, master); | 1013 | ret = devm_spi_register_master(&pdev->dev, master); |
1013 | if (ret < 0) { | 1014 | if (ret < 0) { |
1014 | dev_err(&pdev->dev, "spi_register_master error.\n"); | 1015 | dev_err(&pdev->dev, "spi_register_master error.\n"); |
1015 | goto error2; | 1016 | goto error3; |
1016 | } | 1017 | } |
1017 | 1018 | ||
1018 | dev_info(&pdev->dev, "probed\n"); | 1019 | dev_info(&pdev->dev, "probed\n"); |
1019 | 1020 | ||
1020 | return 0; | 1021 | return 0; |
1021 | 1022 | ||
1022 | error2: | 1023 | error3: |
1023 | rspi_release_dma(rspi); | 1024 | rspi_release_dma(rspi); |
1025 | error2: | ||
1026 | clk_disable(rspi->clk); | ||
1024 | error1: | 1027 | error1: |
1025 | spi_master_put(master); | 1028 | spi_master_put(master); |
1026 | 1029 | ||