[PATCH] media: coda: destroy vdoa context on coda_open() error paths
From: Haoxiang Li
Date: Tue May 26 2026 - 22:24:36 EST
vdoa context is not released in the error path. Call
vdoa_context_destroy() to do the cleanup.
Signed-off-by: Haoxiang Li <lihaoxiang@xxxxxxxxxxxxxxxx>
---
drivers/media/platform/chips-media/coda/coda-common.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index 33f712ff8556..bdc597781e6c 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -2721,6 +2721,8 @@ static int coda_open(struct file *file)
err_clk_enable:
pm_runtime_put_sync(dev->dev);
err_pm_get:
+ if (ctx->vdoa)
+ vdoa_context_destroy(ctx->vdoa);
v4l2_fh_del(&ctx->fh, file);
v4l2_fh_exit(&ctx->fh);
err_coda_name_init:
--
2.25.1