media: iris: Fix runtime PM imbalance in iris_enable_power_domains()
Subsystems (5)
PATCH 1/1 media: iris: Fix runtime PM imbalance in iris_enable_power_domains()
pm_runtime_get_sync() leaves the runtime PM usage count of pd_dev incremented even when resuming the device fails, and iris_enable_power_domains() returns immediately in that case, so the reference is never dropped.
Roll the usage count back with pm_runtime_put_noidle() on the error path.
Fixes bb8a95aa038e ("media: iris: implement power management")
Signed-off-by Wentao Liang <[email protected]>
--- drivers/media/platform/qcom/iris/iris_resources.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/platform/qcom/iris/iris_resources.c +3 -1
@@ -79,8 +79,10 @@ int iris_enable_power_domains(struct iris_core *core, struct device *pd_dev)return ret; ret =pm_runtime_get_sync (pd_dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (pd_dev);return ret; + }return ret; }
Signature · 1 line
2.34.1
Quoted 5 lines · Wentao Liang
pm_runtime_get_sync()leaves the runtime PM usage count ofpd_devincremented even when resuming the device fails, andiris_enable_power_domains()returns immediately in that case, so the reference is never dropped.
Quoted 7 lines
Roll the usage count back with
pm_runtime_put_noidle()on the error path.Fixes bb8a95aa038e ("media: iris: implement power management")Signed-off-by Wentao Liang <[email protected]>---
Already fixed in:
f87d7eda07fc ("media: qcom: iris: fix runtime PM reference leaks")
Konrad