Skip to content
/ linux Public

Commit 43bb0a2

Browse files
jhovoldgregkh
authored andcommitted
drm/tegra: dsi: fix device leak on probe
[ Upstream commit bfef062 ] 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: e94236c ("drm/tegra: dsi: Add ganged mode support") Fixes: 221e363 ("drm/tegra: Fix reference leak in tegra_dsi_ganged_probe") Cc: stable@vger.kernel.org # 3.19: 221e363 Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/20251121164201.13188-1-johan@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ec3be7d commit 43bb0a2

File tree

1 file changed

+2
-4
lines changed
  • drivers/gpu/drm/tegra

1 file changed

+2
-4
lines changed

drivers/gpu/drm/tegra/dsi.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,11 +1539,9 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi)
15391539
return -EPROBE_DEFER;
15401540

15411541
dsi->slave = platform_get_drvdata(gangster);
1542-
1543-
if (!dsi->slave) {
1544-
put_device(&gangster->dev);
1542+
put_device(&gangster->dev);
1543+
if (!dsi->slave)
15451544
return -EPROBE_DEFER;
1546-
}
15471545

15481546
dsi->slave->master = dsi;
15491547
}

0 commit comments

Comments
 (0)