* [PATCH] media: exynos4-is: Fix runtime PM usage counter leak in fimc-isp
@ 2026-09-30 11:38 fengchenguang
2026-09-30 12:05 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: fengchenguang @ 2026-09-30 11:38 UTC (permalink / raw)
To: s.nawrocki, mchehab
Cc: krzk, peter.griffin, alim.akhtar, linux-media, linux-arm-kernel,
linux-samsung-soc, linux-kernel, Chenguang Feng, stable
From: Chenguang Feng <fengchenguang@kylinos.cn>
fimc_isp_subdev_s_power() increments the usage counter with
pm_runtime_resume_and_get() and releases it if fimc_is_start_firmware()
fails, but not when fimc_is_hw_initialize() fails further down: the
function then returns with the counter still held, and the device can
never runtime-suspend afterwards.
Call pm_runtime_put() on the fimc_is_hw_initialize() error path as
well, like the fimc_is_start_firmware() path already does.
Fixes: 9a761e436843f ("[media] exynos4-is: Add Exynos4x12 FIMC-IS driver")
Cc: stable@vger.kernel.org
Signed-off-by: Chenguang Feng <fengchenguang@kylinos.cn>
---
drivers/media/platform/samsung/exynos4-is/fimc-isp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-isp.c b/drivers/media/platform/samsung/exynos4-is/fimc-isp.c
index 896a1b0952ad..8d4efb552424 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-isp.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-isp.c
@@ -322,6 +322,11 @@ static int fimc_isp_subdev_s_power(struct v4l2_subdev *sd, int on)
set_bit(IS_ST_PWR_SUBIP_ON, &is->state);
ret = fimc_is_hw_initialize(is);
+ if (ret < 0) {
+ v4l2_err(sd, "hardware initialization failed\n");
+ pm_runtime_put(&is->pdev->dev);
+ return ret;
+ }
} else {
/* Close sensor */
if (!test_bit(IS_ST_PWR_ON, &is->state)) {
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] media: exynos4-is: Fix runtime PM usage counter leak in fimc-isp
2026-09-30 11:38 [PATCH] media: exynos4-is: Fix runtime PM usage counter leak in fimc-isp fengchenguang
@ 2026-09-30 12:05 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-30 12:05 UTC (permalink / raw)
To: fengchenguang, s.nawrocki, mchehab
Cc: peter.griffin, alim.akhtar, linux-media, linux-arm-kernel,
linux-samsung-soc, linux-kernel, stable
On 30/09/2026 13:38, fengchenguang@kylinos.cn wrote:
> From: Chenguang Feng <fengchenguang@kylinos.cn>
>
> fimc_isp_subdev_s_power() increments the usage counter with
> pm_runtime_resume_and_get() and releases it if fimc_is_start_firmware()
> fails, but not when fimc_is_hw_initialize() fails further down: the
> function then returns with the counter still held, and the device can
> never runtime-suspend afterwards.
>
> Call pm_runtime_put() on the fimc_is_hw_initialize() error path as
> well, like the fimc_is_start_firmware() path already does.
>
> Fixes: 9a761e436843f ("[media] exynos4-is: Add Exynos4x12 FIMC-IS driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Chenguang Feng <fengchenguang@kylinos.cn>
> ---
How many separate patches are you planning to send? Why this cannot be a
patchset? Are we repeating now the recent half-spam of AI created "fixes"?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-30 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 11:38 [PATCH] media: exynos4-is: Fix runtime PM usage counter leak in fimc-isp fengchenguang
2026-09-30 12:05 ` Krzysztof Kozlowski
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®