mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
spi: tegra20-slink: add missed clk_unprepare
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>
This commit is contained in:
parent
912a7df474
commit
04358e40ba
1 changed files with 4 additions and 1 deletions
|
@ -1072,7 +1072,7 @@ static int tegra_slink_probe(struct platform_device *pdev)
|
||||||
ret = clk_enable(tspi->clk);
|
ret = clk_enable(tspi->clk);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(&pdev->dev, "Clock enable failed %d\n", ret);
|
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);
|
spi_irq = platform_get_irq(pdev, 0);
|
||||||
|
@ -1145,6 +1145,8 @@ static int tegra_slink_probe(struct platform_device *pdev)
|
||||||
free_irq(spi_irq, tspi);
|
free_irq(spi_irq, tspi);
|
||||||
exit_clk_disable:
|
exit_clk_disable:
|
||||||
clk_disable(tspi->clk);
|
clk_disable(tspi->clk);
|
||||||
|
exit_clk_unprepare:
|
||||||
|
clk_unprepare(tspi->clk);
|
||||||
exit_free_master:
|
exit_free_master:
|
||||||
spi_master_put(master);
|
spi_master_put(master);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1158,6 +1160,7 @@ static int tegra_slink_remove(struct platform_device *pdev)
|
||||||
free_irq(tspi->irq, tspi);
|
free_irq(tspi->irq, tspi);
|
||||||
|
|
||||||
clk_disable(tspi->clk);
|
clk_disable(tspi->clk);
|
||||||
|
clk_unprepare(tspi->clk);
|
||||||
|
|
||||||
if (tspi->tx_dma_chan)
|
if (tspi->tx_dma_chan)
|
||||||
tegra_slink_deinit_dma_param(tspi, false);
|
tegra_slink_deinit_dma_param(tspi, false);
|
||||||
|
|
Loading…
Reference in a new issue