public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] media: cedrus: Fix missing cleanup in error path
@ 2026-04-01 19:14 Andrey Skvortsov
  2026-04-01 19:14 ` [PATCH 2/2] media: cedrus: Fix failure to clean up hardware on probe failure Andrey Skvortsov
  2026-04-02 13:09 ` [PATCH 1/2] media: cedrus: Fix missing cleanup in error path Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Andrey Skvortsov @ 2026-04-01 19:14 UTC (permalink / raw)
  To: Maxime Ripard, Paul Kocialkowski, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Hans Verkuil, linux-media, linux-staging, linux-arm-kernel,
	linux-sunxi, linux-kernel
  Cc: Andrey Skvortsov

From: Samuel Holland <samuel@sholland.org>

From: Samuel Holland <samuel@sholland.org>

According to the documentation struct v4l2_fh has to be cleaned up with
v4l2_fh_exit() before being freed. [1]

1. https://docs.kernel.org/driver-api/media/v4l2-fh.html

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fixes: 50e761516f2b ("media: platform: Add Cedrus VPU decoder driver")
---
 drivers/staging/media/sunxi/cedrus/cedrus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
index 6600245dff0e2..1d2130f35fffc 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -391,6 +391,7 @@ static int cedrus_open(struct file *file)
 err_m2m_release:
 	v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
 err_free:
+	v4l2_fh_exit(&ctx->fh);
 	kfree(ctx);
 	mutex_unlock(&dev->dev_mutex);
 
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-02 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-01 19:14 [PATCH 1/2] media: cedrus: Fix missing cleanup in error path Andrey Skvortsov
2026-04-01 19:14 ` [PATCH 2/2] media: cedrus: Fix failure to clean up hardware on probe failure Andrey Skvortsov
2026-04-02 13:00   ` Dan Carpenter
2026-04-02 13:09 ` [PATCH 1/2] media: cedrus: Fix missing cleanup in error path Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox