[PATCH] i2c: designware: amdisp: balance genpd on probe failure

From: Guangshuo Li

Date: Wed Jul 08 2026 - 05:06:22 EST


The change referenced by the Fixes tag avoids a runtime PM resume during
probe by powering the ISP domain directly with dev_pm_genpd_resume()
before calling i2c_dw_probe(). Runtime PM is enabled only after
i2c_dw_probe() has succeeded.

However, the i2c_dw_probe() failure path still uses the old runtime PM
cleanup path. At that point pm_runtime_enable() has not been called yet,
so pm_runtime_disable() is not paired with any enable. The failure path
also skips the dev_pm_genpd_suspend() needed to balance the direct
dev_pm_genpd_resume() call.

Suspend the genpd on the i2c_dw_probe() failure path instead of disabling
runtime PM. This keeps the direct genpd resume/suspend pairing symmetric
on both success and failure paths.

Fixes: e2f1ada8e089 ("i2c: designware: amdisp: Fix resume-probe race condition issue")
Signed-off-by: Guangshuo Li <lgs201920130244@xxxxxxxxx>
---
drivers/i2c/busses/i2c-designware-amdisp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-amdisp.c b/drivers/i2c/busses/i2c-designware-amdisp.c
index 9f0ec0fae6f2..724cb05e21c8 100644
--- a/drivers/i2c/busses/i2c-designware-amdisp.c
+++ b/drivers/i2c/busses/i2c-designware-amdisp.c
@@ -81,7 +81,7 @@ static int amd_isp_dw_i2c_plat_probe(struct platform_device *pdev)
ret = i2c_dw_probe(isp_i2c_dev);
if (ret) {
dev_err_probe(&pdev->dev, ret, "i2c_dw_probe failed\n");
- goto error_release_rpm;
+ goto error_suspend_genpd;
}
dev_pm_genpd_suspend(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
@@ -89,8 +89,8 @@ static int amd_isp_dw_i2c_plat_probe(struct platform_device *pdev)

return 0;

-error_release_rpm:
- amd_isp_dw_i2c_plat_pm_cleanup(isp_i2c_dev);
+error_suspend_genpd:
+ dev_pm_genpd_suspend(&pdev->dev);
return ret;
}

--
2.43.0