Skip to content

Commit aa57e77

Browse files
Zhang Qilongsre
authored andcommitted
HSI: Fix PM usage counter unbalance in ssi_hw_init
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: b209e04 ("HSI: Introduce OMAP SSI driver") Signed-off-by: Zhang Qilong <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 5c8fe58 commit aa57e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hsi/controllers/omap_ssi_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static int ssi_hw_init(struct hsi_controller *ssi)
424424
struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi);
425425
int err;
426426

427-
err = pm_runtime_get_sync(ssi->device.parent);
427+
err = pm_runtime_resume_and_get(ssi->device.parent);
428428
if (err < 0) {
429429
dev_err(&ssi->device, "runtime PM failed %d\n", err);
430430
return err;

0 commit comments

Comments
 (0)