mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aleksandr Chubuchnyi <chubuchnyi@gmail.com>
To: sakari.ailus@linux.intel.com, laurent.pinchart@ideasonboard.com,
	mchehab@kernel.org, mani@kernel.org,
	michael.riesch@collabora.com, jacopo.mondi@ideasonboard.com,
	nicholas@rothemail.net, benjamin.mugnier@foss.st.com,
	sylvain.petinot@foss.st.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: [PATCH 3/5] media: i2c: mt9m114: Add missing v4l2_subdev_cleanup() calls
Date: Wed,  9 Sep 2026 11:02:25 +0300	[thread overview]
Message-ID: <f3340fe13dfc5c331da1444335508fbcc02e0c23.1788940469.git.chubuchnyi@gmail.com> (raw)
In-Reply-To: <cover.1788940469.git.chubuchnyi@gmail.com>

The subdev active state allocated by v4l2_subdev_init_finalize() is leaked
on unbind, for both the pixel array and the image flow processor subdev.

Fixes: 24d756e914fc ("media: i2c: Add driver for onsemi MT9M114 camera sensor")
Cc: stable@vger.kernel.org
Signed-off-by: Aleksandr Chubuchnyi <chubuchnyi@gmail.com>
---
 drivers/media/i2c/mt9m114.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c
index 848ea06e7..137e8e6df 100644
--- a/drivers/media/i2c/mt9m114.c
+++ b/drivers/media/i2c/mt9m114.c
@@ -1482,6 +1482,7 @@ static int mt9m114_pa_init(struct mt9m114 *sensor)
 
 static void mt9m114_pa_cleanup(struct mt9m114 *sensor)
 {
+	v4l2_subdev_cleanup(&sensor->pa.sd);
 	v4l2_ctrl_handler_free(&sensor->pa.hdl);
 	media_entity_cleanup(&sensor->pa.sd.entity);
 }
@@ -2208,6 +2209,7 @@ static int mt9m114_ifp_init(struct mt9m114 *sensor)
 
 static void mt9m114_ifp_cleanup(struct mt9m114 *sensor)
 {
+	v4l2_subdev_cleanup(&sensor->ifp.sd);
 	v4l2_ctrl_handler_free(&sensor->ifp.hdl);
 	media_entity_cleanup(&sensor->ifp.sd.entity);
 }
-- 
2.43.0


  parent reply	other threads:[~2026-09-09  8:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  8:02 [PATCH 0/5] media: i2c: " Aleksandr Chubuchnyi
2026-09-09  8:02 ` [PATCH 1/5] media: i2c: imx296: Add missing v4l2_subdev_cleanup() call Aleksandr Chubuchnyi
2026-09-09  8:02 ` [PATCH 2/5] media: i2c: imx415: " Aleksandr Chubuchnyi
2026-09-09  8:02 ` Aleksandr Chubuchnyi [this message]
2026-09-09  8:02 ` [PATCH 4/5] media: i2c: ov8858: " Aleksandr Chubuchnyi
2026-09-09  8:02 ` [PATCH 5/5] media: i2c: st-mipid02: " Aleksandr Chubuchnyi

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=f3340fe13dfc5c331da1444335508fbcc02e0c23.1788940469.git.chubuchnyi@gmail.com \
    --to=chubuchnyi@gmail.com \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=michael.riesch@collabora.com \
    --cc=nicholas@rothemail.net \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=sylvain.petinot@foss.st.com \
    /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 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®