Skip to content

Commit 1f120e1

Browse files
jhovoldgregkh
authored andcommitted
spi: imx: fix runtime pm leak on probe deferral
commit a1d50a3 upstream. Make sure to balance the runtime PM usage count before returning on probe failure (e.g. probe deferral) so that the controller can be suspended when a driver is later bound. Fixes: 43b6bf4 ("spi: imx: fix runtime pm support for !CONFIG_PM") Cc: stable@vger.kernel.org # 5.10 Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260421125632.1537235-1-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 17aa64b commit 1f120e1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/spi/spi-imx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,6 +1881,7 @@ static int spi_imx_probe(struct platform_device *pdev)
18811881
out_runtime_pm_put:
18821882
pm_runtime_dont_use_autosuspend(spi_imx->dev);
18831883
pm_runtime_disable(spi_imx->dev);
1884+
pm_runtime_put_noidle(spi_imx->dev);
18841885
pm_runtime_set_suspended(&pdev->dev);
18851886

18861887
clk_disable_unprepare(spi_imx->clk_ipg);

0 commit comments

Comments
 (0)