Skip to content

Commit

Permalink
spi: st-ssc4: add missed pm_runtime_disable
Browse files Browse the repository at this point in the history
The driver forgets to call pm_runtime_disable in probe failure
and remove.
Add the missed calls to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191118024848.21645-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Chuhong Yuan authored and Mark Brown committed Nov 18, 2019
1 parent 04358e4 commit cd050ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/spi/spi-st-ssc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ static int spi_st_probe(struct platform_device *pdev)
return 0;

clk_disable:
pm_runtime_disable(&pdev->dev);
clk_disable_unprepare(spi_st->clk);
put_master:
spi_master_put(master);
Expand All @@ -392,6 +393,8 @@ static int spi_st_remove(struct platform_device *pdev)
struct spi_master *master = platform_get_drvdata(pdev);
struct spi_st *spi_st = spi_master_get_devdata(master);

pm_runtime_disable(&pdev->dev);

clk_disable_unprepare(spi_st->clk);

pinctrl_pm_select_sleep_state(&pdev->dev);
Expand Down

0 comments on commit cd050ab

Please sign in to comment.