Commit b1852c5d authored by Clark Wang's avatar Clark Wang Committed by Andi Shyti
Browse files

i2c: imx-lpi2c: Fix clock count when probe defers



Deferred probe with pm_runtime_put() may delay clock disable, causing
incorrect clock usage count. Use pm_runtime_put_sync() to ensure the
clock is disabled immediately.

Fixes: 13d6eb20 ("i2c: imx-lpi2c: add runtime pm support")
Signed-off-by: default avatarClark Wang <xiaoning.wang@nxp.com>
Signed-off-by: default avatarCarlos Song <carlos.song@nxp.com>
Cc: <stable@vger.kernel.org> # v4.16+
Link: https://lore.kernel.org/r/20250421062341.2471922-1-carlos.song@nxp.com


Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
parent b4432656
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1380,9 +1380,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
	return 0;

rpm_disable:
	pm_runtime_put(&pdev->dev);
	pm_runtime_disable(&pdev->dev);
	pm_runtime_dont_use_autosuspend(&pdev->dev);
	pm_runtime_put_sync(&pdev->dev);
	pm_runtime_disable(&pdev->dev);

	return ret;
}