* [PATCH v2] drm/imx/tve: fix probe device leak
@ 2025-10-30 16:34 Johan Hovold
2025-11-20 13:10 ` Johan Hovold
0 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2025-10-30 16:34 UTC (permalink / raw)
To: Philipp Zabel
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, dri-devel, imx, linux-kernel, Johan Hovold, stable,
Frank Li
Make sure to drop the reference taken to the DDC device during probe on
probe failure (e.g. probe deferral) and on driver unbind.
Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")
Cc: stable@vger.kernel.org # 3.10
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
Changes in v2:
- add missing NULL ddc check
drivers/gpu/drm/imx/ipuv3/imx-tve.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/imx/ipuv3/imx-tve.c b/drivers/gpu/drm/imx/ipuv3/imx-tve.c
index fd1e617e171e..68bbbdbd347b 100644
--- a/drivers/gpu/drm/imx/ipuv3/imx-tve.c
+++ b/drivers/gpu/drm/imx/ipuv3/imx-tve.c
@@ -525,6 +525,13 @@ static const struct component_ops imx_tve_ops = {
.bind = imx_tve_bind,
};
+static void imx_tve_put_device(void *_dev)
+{
+ struct device *dev = _dev;
+
+ put_device(dev);
+}
+
static int imx_tve_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -546,6 +553,12 @@ static int imx_tve_probe(struct platform_device *pdev)
if (ddc_node) {
tve->ddc = of_find_i2c_adapter_by_node(ddc_node);
of_node_put(ddc_node);
+ if (tve->ddc) {
+ ret = devm_add_action_or_reset(dev, imx_tve_put_device,
+ &tve->ddc->dev);
+ if (ret)
+ return ret;
+ }
}
tve->mode = of_get_tve_mode(np);
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v2] drm/imx/tve: fix probe device leak
2025-10-30 16:34 [PATCH v2] drm/imx/tve: fix probe device leak Johan Hovold
@ 2025-11-20 13:10 ` Johan Hovold
2026-01-14 10:58 ` Johan Hovold
0 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2025-11-20 13:10 UTC (permalink / raw)
To: Philipp Zabel
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, dri-devel, imx, linux-kernel, stable, Frank Li
On Thu, Oct 30, 2025 at 05:34:56PM +0100, Johan Hovold wrote:
> Make sure to drop the reference taken to the DDC device during probe on
> probe failure (e.g. probe deferral) and on driver unbind.
>
> Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")
> Cc: stable@vger.kernel.org # 3.10
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
>
> Changes in v2:
> - add missing NULL ddc check
Can this one be picked up for 6.19?
Johan
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] drm/imx/tve: fix probe device leak
2025-11-20 13:10 ` Johan Hovold
@ 2026-01-14 10:58 ` Johan Hovold
2026-01-27 15:59 ` Johan Hovold
0 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2026-01-14 10:58 UTC (permalink / raw)
To: Philipp Zabel
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, dri-devel, imx, linux-kernel, stable, Frank Li
On Thu, Nov 20, 2025 at 02:10:48PM +0100, Johan Hovold wrote:
> On Thu, Oct 30, 2025 at 05:34:56PM +0100, Johan Hovold wrote:
> > Make sure to drop the reference taken to the DDC device during probe on
> > probe failure (e.g. probe deferral) and on driver unbind.
> >
> > Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")
> > Cc: stable@vger.kernel.org # 3.10
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > Signed-off-by: Johan Hovold <johan@kernel.org>
> > ---
> >
> > Changes in v2:
> > - add missing NULL ddc check
>
> Can this one be picked up for 6.19?
It's been two more months so sending another reminder.
Can this one be merged now?
Johan
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] drm/imx/tve: fix probe device leak
2026-01-14 10:58 ` Johan Hovold
@ 2026-01-27 15:59 ` Johan Hovold
2026-01-28 9:58 ` Maxime Ripard
0 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2026-01-27 15:59 UTC (permalink / raw)
To: Philipp Zabel
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, dri-devel, imx, linux-kernel, stable, Frank Li
On Wed, Jan 14, 2026 at 11:58:14AM +0100, Johan Hovold wrote:
> On Thu, Nov 20, 2025 at 02:10:48PM +0100, Johan Hovold wrote:
> > On Thu, Oct 30, 2025 at 05:34:56PM +0100, Johan Hovold wrote:
> > > Make sure to drop the reference taken to the DDC device during probe on
> > > probe failure (e.g. probe deferral) and on driver unbind.
> > >
> > > Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")
> > > Cc: stable@vger.kernel.org # 3.10
> > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > > Signed-off-by: Johan Hovold <johan@kernel.org>
> > > ---
> > >
> > > Changes in v2:
> > > - add missing NULL ddc check
> >
> > Can this one be picked up for 6.19?
>
> It's been two more months so sending another reminder.
>
> Can this one be merged now?
Can someone please merge this for 6.20?
Johan
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] drm/imx/tve: fix probe device leak
2026-01-27 15:59 ` Johan Hovold
@ 2026-01-28 9:58 ` Maxime Ripard
2026-01-28 10:03 ` Johan Hovold
0 siblings, 1 reply; 6+ messages in thread
From: Maxime Ripard @ 2026-01-28 9:58 UTC (permalink / raw)
To: Johan Hovold
Cc: Philipp Zabel, Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Simona Vetter, dri-devel, imx, linux-kernel, stable, Frank Li
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
Hi,
On Tue, Jan 27, 2026 at 04:59:20PM +0100, Johan Hovold wrote:
> On Wed, Jan 14, 2026 at 11:58:14AM +0100, Johan Hovold wrote:
> > On Thu, Nov 20, 2025 at 02:10:48PM +0100, Johan Hovold wrote:
> > > On Thu, Oct 30, 2025 at 05:34:56PM +0100, Johan Hovold wrote:
> > > > Make sure to drop the reference taken to the DDC device during probe on
> > > > probe failure (e.g. probe deferral) and on driver unbind.
> > > >
> > > > Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")
> > > > Cc: stable@vger.kernel.org # 3.10
> > > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > > > Signed-off-by: Johan Hovold <johan@kernel.org>
> > > > ---
> > > >
> > > > Changes in v2:
> > > > - add missing NULL ddc check
> > >
> > > Can this one be picked up for 6.19?
> >
> > It's been two more months so sending another reminder.
> >
> > Can this one be merged now?
>
> Can someone please merge this for 6.20?
I'm not sure what went wrong, but I just applied it. It should end up in
6.19.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] drm/imx/tve: fix probe device leak
2026-01-28 9:58 ` Maxime Ripard
@ 2026-01-28 10:03 ` Johan Hovold
0 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2026-01-28 10:03 UTC (permalink / raw)
To: Maxime Ripard
Cc: Philipp Zabel, Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Simona Vetter, dri-devel, imx, linux-kernel, stable, Frank Li
[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]
On Wed, Jan 28, 2026 at 10:58:41AM +0100, Maxime Ripard wrote:
> Hi,
>
> On Tue, Jan 27, 2026 at 04:59:20PM +0100, Johan Hovold wrote:
> > On Wed, Jan 14, 2026 at 11:58:14AM +0100, Johan Hovold wrote:
> > > On Thu, Nov 20, 2025 at 02:10:48PM +0100, Johan Hovold wrote:
> > > > On Thu, Oct 30, 2025 at 05:34:56PM +0100, Johan Hovold wrote:
> > > > > Make sure to drop the reference taken to the DDC device during probe on
> > > > > probe failure (e.g. probe deferral) and on driver unbind.
> > > > >
> > > > > Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")
> > > > > Cc: stable@vger.kernel.org # 3.10
> > > > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > > > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > > > > Signed-off-by: Johan Hovold <johan@kernel.org>
> > > > > ---
> > > > >
> > > > > Changes in v2:
> > > > > - add missing NULL ddc check
> > > >
> > > > Can this one be picked up for 6.19?
> > >
> > > It's been two more months so sending another reminder.
> > >
> > > Can this one be merged now?
> >
> > Can someone please merge this for 6.20?
>
> I'm not sure what went wrong, but I just applied it. It should end up in
> 6.19.
Thanks, Maxime.
Johan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-28 10:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 16:34 [PATCH v2] drm/imx/tve: fix probe device leak Johan Hovold
2025-11-20 13:10 ` Johan Hovold
2026-01-14 10:58 ` Johan Hovold
2026-01-27 15:59 ` Johan Hovold
2026-01-28 9:58 ` Maxime Ripard
2026-01-28 10:03 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox