* [PATCH] drm/tegra: dsi: fix device leak on probe
@ 2025-11-21 16:42 Johan Hovold
2026-01-14 11:01 ` Johan Hovold
0 siblings, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2025-11-21 16:42 UTC (permalink / raw)
To: Thierry Reding, Mikko Perttunen
Cc: David Airlie, Simona Vetter, dri-devel, linux-tegra, linux-kernel,
Johan Hovold, stable, Thierry Reding
Make sure to drop the reference taken when looking up the companion
(ganged) device and its driver data during probe().
Note that holding a reference to a device does not prevent its driver
data from going away so there is no point in keeping the reference.
Fixes: e94236cde4d5 ("drm/tegra: dsi: Add ganged mode support")
Fixes: 221e3638feb8 ("drm/tegra: Fix reference leak in tegra_dsi_ganged_probe")
Cc: stable@vger.kernel.org # 3.19: 221e3638feb8
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/gpu/drm/tegra/dsi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index b5089b772267..b53038eb9699 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -1549,11 +1549,9 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi)
return -EPROBE_DEFER;
dsi->slave = platform_get_drvdata(gangster);
-
- if (!dsi->slave) {
- put_device(&gangster->dev);
+ put_device(&gangster->dev);
+ if (!dsi->slave)
return -EPROBE_DEFER;
- }
dsi->slave->master = dsi;
}
--
2.51.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tegra: dsi: fix device leak on probe
2025-11-21 16:42 [PATCH] drm/tegra: dsi: fix device leak on probe Johan Hovold
@ 2026-01-14 11:01 ` Johan Hovold
2026-01-16 12:14 ` Thierry Reding
0 siblings, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2026-01-14 11:01 UTC (permalink / raw)
To: Thierry Reding, Mikko Perttunen
Cc: David Airlie, Simona Vetter, dri-devel, linux-tegra, linux-kernel,
stable, Thierry Reding
On Fri, Nov 21, 2025 at 05:42:01PM +0100, Johan Hovold wrote:
> Make sure to drop the reference taken when looking up the companion
> (ganged) device and its driver data during probe().
>
> Note that holding a reference to a device does not prevent its driver
> data from going away so there is no point in keeping the reference.
>
> Fixes: e94236cde4d5 ("drm/tegra: dsi: Add ganged mode support")
> Fixes: 221e3638feb8 ("drm/tegra: Fix reference leak in tegra_dsi_ganged_probe")
> Cc: stable@vger.kernel.org # 3.19: 221e3638feb8
> Cc: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
Can this one be picked up now?
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tegra: dsi: fix device leak on probe
2026-01-14 11:01 ` Johan Hovold
@ 2026-01-16 12:14 ` Thierry Reding
2026-01-16 16:34 ` Johan Hovold
0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2026-01-16 12:14 UTC (permalink / raw)
To: Johan Hovold
Cc: Mikko Perttunen, David Airlie, Simona Vetter, dri-devel,
linux-tegra, linux-kernel, stable, Thierry Reding
[-- Attachment #1: Type: text/plain, Size: 856 bytes --]
On Wed, Jan 14, 2026 at 12:01:28PM +0100, Johan Hovold wrote:
> On Fri, Nov 21, 2025 at 05:42:01PM +0100, Johan Hovold wrote:
> > Make sure to drop the reference taken when looking up the companion
> > (ganged) device and its driver data during probe().
> >
> > Note that holding a reference to a device does not prevent its driver
> > data from going away so there is no point in keeping the reference.
> >
> > Fixes: e94236cde4d5 ("drm/tegra: dsi: Add ganged mode support")
> > Fixes: 221e3638feb8 ("drm/tegra: Fix reference leak in tegra_dsi_ganged_probe")
> > Cc: stable@vger.kernel.org # 3.19: 221e3638feb8
> > Cc: Thierry Reding <treding@nvidia.com>
> > Signed-off-by: Johan Hovold <johan@kernel.org>
>
> Can this one be picked up now?
Sorry, forgot to notify you earlier that I've picked this up into
drm-misc-next.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tegra: dsi: fix device leak on probe
2026-01-16 12:14 ` Thierry Reding
@ 2026-01-16 16:34 ` Johan Hovold
0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2026-01-16 16:34 UTC (permalink / raw)
To: Thierry Reding
Cc: Mikko Perttunen, David Airlie, Simona Vetter, dri-devel,
linux-tegra, linux-kernel, stable, Thierry Reding
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
On Fri, Jan 16, 2026 at 01:14:19PM +0100, Thierry Reding wrote:
> On Wed, Jan 14, 2026 at 12:01:28PM +0100, Johan Hovold wrote:
> > On Fri, Nov 21, 2025 at 05:42:01PM +0100, Johan Hovold wrote:
> > > Make sure to drop the reference taken when looking up the companion
> > > (ganged) device and its driver data during probe().
> > >
> > > Note that holding a reference to a device does not prevent its driver
> > > data from going away so there is no point in keeping the reference.
> > >
> > > Fixes: e94236cde4d5 ("drm/tegra: dsi: Add ganged mode support")
> > > Fixes: 221e3638feb8 ("drm/tegra: Fix reference leak in tegra_dsi_ganged_probe")
> > > Cc: stable@vger.kernel.org # 3.19: 221e3638feb8
> > > Cc: Thierry Reding <treding@nvidia.com>
> > > Signed-off-by: Johan Hovold <johan@kernel.org>
> >
> > Can this one be picked up now?
>
> Sorry, forgot to notify you earlier that I've picked this up into
> drm-misc-next.
No worries, I noticed this morning when looking at linux-next.
Thanks!
Johan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-16 16:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21 16:42 [PATCH] drm/tegra: dsi: fix device leak on probe Johan Hovold
2026-01-14 11:01 ` Johan Hovold
2026-01-16 12:14 ` Thierry Reding
2026-01-16 16:34 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox