mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
drm/tegra: dsi: fix device leak on probe
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:e94236cde4("drm/tegra: dsi: Add ganged mode support") Fixes:221e3638fe("drm/tegra: Fix reference leak in tegra_dsi_ganged_probe") Cc: stable@vger.kernel.org # 3.19:221e3638feCc: 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
This commit is contained in:
parent
cd98e73492
commit
bfef062695
|
|
@ -1542,11 +1542,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user