diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-11-15 16:31:22 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-31 12:37:42 +0100 |
commit | c4fd0e76e47195b9096f7334102d5e115cd91feb (patch) | |
tree | cbe6c4719c92cd125adc42a312b625840a8bc986 | |
parent | 79bb64337a1d9247d657fe8b1cd9643adfcdf382 (diff) | |
download | linux-stable-c4fd0e76e47195b9096f7334102d5e115cd91feb.tar.gz linux-stable-c4fd0e76e47195b9096f7334102d5e115cd91feb.tar.bz2 linux-stable-c4fd0e76e47195b9096f7334102d5e115cd91feb.zip |
spi: tegra20-slink: add missed clk_unprepare
[ Upstream commit 04358e40ba96d687c0811c21d9dede73f5244a98 ]
The driver misses calling clk_unprepare in probe failure and remove.
Add the calls to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191115083122.12278-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/spi/spi-tegra20-slink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index 9831c1106945..62b074b167a9 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1078,7 +1078,7 @@ static int tegra_slink_probe(struct platform_device *pdev) ret = clk_enable(tspi->clk); if (ret < 0) { dev_err(&pdev->dev, "Clock enable failed %d\n", ret); - goto exit_free_master; + goto exit_clk_unprepare; } spi_irq = platform_get_irq(pdev, 0); @@ -1151,6 +1151,8 @@ exit_free_irq: free_irq(spi_irq, tspi); exit_clk_disable: clk_disable(tspi->clk); +exit_clk_unprepare: + clk_unprepare(tspi->clk); exit_free_master: spi_master_put(master); return ret; @@ -1164,6 +1166,7 @@ static int tegra_slink_remove(struct platform_device *pdev) free_irq(tspi->irq, tspi); clk_disable(tspi->clk); + clk_unprepare(tspi->clk); if (tspi->tx_dma_chan) tegra_slink_deinit_dma_param(tspi, false); |