summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Gu <ustc.gu@gmail.com>2026-03-21 12:04:43 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-04-12 17:38:50 +0300
commit19d6dd322c3f05550606dbfcbafb5f6989975c02 (patch)
tree0c4eb893e1ed45cdd76450dfffb5a77b60650cfe
parentbef1eef667186cedb0bc6d152464acb3c97d5f72 (diff)
downloadlinux-19d6dd322c3f05550606dbfcbafb5f6989975c02.tar.xz
i3c: master: dw-i3c: Balance PM runtime usage count on probe failure
When DW_I3C_DISABLE_RUNTIME_PM_QUIRK is set, the probe function calls pm_runtime_get_noresume() to prevent runtime suspend. However, if i3c_master_register() fails, the error path does not balance this call, leaving the usage count incremented. Add pm_runtime_put_noidle() in the error cleanup path to properly balance the usage count. Fixes: fba0e56ee752 ("i3c: dw: Disable runtime PM on Agilex5 to avoid bus hang on IBI") Signed-off-by: Felix Gu <ustc.gu@gmail.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260321-dw-i3c-1-v1-1-821623aac7bb@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/i3c/master/dw-i3c-master.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 3379cb16eeca..b87073d2f8af 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -1667,6 +1667,8 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
return 0;
err_disable_pm:
+ if (master->quirks & DW_I3C_DISABLE_RUNTIME_PM_QUIRK)
+ pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);