RE: [EXT] [PATCH] media: amphion: fix runtime PM imbalance on probe failure
From: Ming Qian
Date: Sun Jul 26 2026 - 22:59:35 EST
>From: Jiawen Liu <1298662399@xxxxxx>
>Sent: Sunday, July 26, 2026 2:36 PM
>To: Ming Qian <ming.qian@xxxxxxx>; Eagle Zhou <eagle.zhou@xxxxxxx>;
>Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
>Cc: linux-media@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Jiawen Liu
><1298662399@xxxxxx>
>Subject: [EXT] [PATCH] media: amphion: fix runtime PM imbalance on probe
>failure
>
>[Some people who received this message don't often get email from
>1298662399@xxxxxx. Learn why this is important at
>https://aka.ms/LearnAboutSenderIdentification ]
>
>Caution: This is an external email. Please take care when clicking links or
>opening attachments. When in doubt, report the message using the 'Report
>this email' button
>
>
>vpu_core_probe() enables runtime PM before calling
>pm_runtime_resume_and_get().
>
>If pm_runtime_resume_and_get() fails, it has already dropped the runtime PM
>usage counter that it acquired before trying to resume the device. Calling
>pm_runtime_put_noidle() again on this error path drops the counter one extra
>time.
>
>Remove the extra put and keep the existing cleanup that marks the device
>suspended before disabling runtime PM.
>
>Signed-off-by: Jiawen Liu <1298662399@xxxxxx>
Reviewed-by: Ming Qian <ming.qian@xxxxxxx>
>---
> drivers/media/platform/amphion/vpu_core.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/media/platform/amphion/vpu_core.c
>b/drivers/media/platform/amphion/vpu_core.c
>index 85cc4a14f8ed..3192cccb7e68 100644
>--- a/drivers/media/platform/amphion/vpu_core.c
>+++ b/drivers/media/platform/amphion/vpu_core.c
>@@ -666,7 +666,6 @@ static int vpu_core_probe(struct platform_device
>*pdev)
> pm_runtime_enable(dev);
> ret = pm_runtime_resume_and_get(dev);
> if (ret) {
>- pm_runtime_put_noidle(dev);
> pm_runtime_set_suspended(dev);
> goto err_runtime_disable;
> }
>--
>2.34.1