From: Wentao Liang <vulab@iscas.ac.cn>
To: abhinav.kumar@linux.dev
Cc: bod@kernel.org, dikshita.agarwal@oss.qualcomm.com,
hverkuil@kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
mchehab@kernel.org, stefan.schmidt@linaro.org,
vikash.garodia@oss.qualcomm.com, Wentao Liang <vulab@iscas.ac.cn>,
stable@vger.kernel.org
Subject: [PATCH] media: iris: Fix runtime PM imbalance in iris_enable_power_domains()
Date: Thu, 17 Sep 2026 09:57:41 +0000 [thread overview]
Message-ID: <20260917095741.2145688-1-vulab@iscas.ac.cn> (raw)
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")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/media/platform/qcom/iris/iris_resources.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/iris/iris_resources.c b/drivers/media/platform/qcom/iris/iris_resources.c
index 773f6548370a..d56bc8cc66ed 100644
--- a/drivers/media/platform/qcom/iris/iris_resources.c
+++ b/drivers/media/platform/qcom/iris/iris_resources.c
@@ -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;
}
--
2.34.1
next reply other threads:[~2026-09-17 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 9:57 Wentao Liang [this message]
2026-09-21 9:04 ` Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260917095741.2145688-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=hverkuil@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
--cc=stefan.schmidt@linaro.org \
--cc=vikash.garodia@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®