Skip to content

Commit 19d6dd3

Browse files
outman119alexandrebelloni
authored andcommitted
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: fba0e56 ("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>
1 parent bef1eef commit 19d6dd3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/i3c/master/dw-i3c-master.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,6 +1667,8 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
16671667
return 0;
16681668

16691669
err_disable_pm:
1670+
if (master->quirks & DW_I3C_DISABLE_RUNTIME_PM_QUIRK)
1671+
pm_runtime_put_noidle(&pdev->dev);
16701672
pm_runtime_disable(&pdev->dev);
16711673
pm_runtime_set_suspended(&pdev->dev);
16721674
pm_runtime_dont_use_autosuspend(&pdev->dev);

0 commit comments

Comments
 (0)