diff options
| author | Hungyu Lin <dennylin0707@gmail.com> | 2026-06-04 05:04:51 +0000 |
|---|---|---|
| committer | Bryan O'Donoghue <bod@kernel.org> | 2026-07-30 10:47:46 +0100 |
| commit | 75d79879ec3cbfd288144b0ae4c3e3fa7700c5fc (patch) | |
| tree | 037895c5936aacac0b4dc81e4b9c61bb50b15bbd | |
| parent | 14634f3161e8996cbdf83fc7f36b33833a0015b1 (diff) | |
| download | linux-next-75d79879ec3cbfd288144b0ae4c3e3fa7700c5fc.tar.gz linux-next-75d79879ec3cbfd288144b0ae4c3e3fa7700c5fc.zip | |
media: qcom: iris: handle runtime PM resume failure in core deinit
Check the return value of pm_runtime_resume_and_get() in
iris_core_deinit().
If runtime PM resume fails, skip hardware power-off operations but
still perform software teardown and state transition. Also skip the
corresponding pm_runtime_put_sync() call to avoid unbalanced runtime
PM references.
Fixes: bb8a95aa038e ("media: iris: implement power management")
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
| -rw-r--r-- | drivers/media/platform/qcom/iris/iris_core.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/platform/qcom/iris/iris_core.c b/drivers/media/platform/qcom/iris/iris_core.c index 52bf56e517f9..8c335dbfce16 100644 --- a/drivers/media/platform/qcom/iris/iris_core.c +++ b/drivers/media/platform/qcom/iris/iris_core.c @@ -12,18 +12,24 @@ void iris_core_deinit(struct iris_core *core) { - pm_runtime_resume_and_get(core->dev); + int ret; + + ret = pm_runtime_resume_and_get(core->dev); mutex_lock(&core->lock); if (core->state != IRIS_CORE_DEINIT) { iris_fw_unload(core); - iris_vpu_power_off(core); + + if (!ret) + iris_vpu_power_off(core); + iris_hfi_queues_deinit(core); core->state = IRIS_CORE_DEINIT; } mutex_unlock(&core->lock); - pm_runtime_put_sync(core->dev); + if (!ret) + pm_runtime_put_sync(core->dev); } static int iris_wait_for_system_response(struct iris_core *core) |
