All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Maxime Ripard <mripard@kernel.org>
Subject: [PATCH] sun4i-csi: call _vb2_fop_release instead of v4l2_fh_release
Date: Tue, 7 Jul 2020 15:36:47 +0200	[thread overview]
Message-ID: <8002e999-feb5-8715-9e1a-ed67165ade7e@xs4all.nl> (raw)

This driver didn't call _vb2_fop_release in the sun4i_csi_release
function. Without that call the vb2 queue is not properly canceled and
buffers may not be freed.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
Compile tested only due to lack of a suitable sensor.
I believe I do have an ov7670, but it's in the wrong country :-)
---
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
index 1721e5aee9c6..8f4e254b6a41 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
@@ -242,7 +242,8 @@ static int sun4i_csi_release(struct file *file)

 	mutex_lock(&csi->lock);

-	v4l2_fh_release(file);
+	_vb2_fop_release(file, NULL);
+
 	v4l2_pipeline_pm_put(&csi->vdev.entity);
 	pm_runtime_put(csi->dev);


             reply	other threads:[~2020-07-07 13:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 13:36 Hans Verkuil [this message]
2020-07-08 17:50 ` [PATCH] sun4i-csi: call _vb2_fop_release instead of v4l2_fh_release Maxime Ripard

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=8002e999-feb5-8715-9e1a-ed67165ade7e@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mripard@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.