You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
drm/tegra: Fix reference leak in tegra_dsi_ganged_probe
[ Upstream commit221e3638fe] The reference taken by 'of_find_device_by_node()' must be released when not needed anymore. Add put_device() call to fix this. Fixes:e94236cde4("drm/tegra: dsi: Add ganged mode support") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9ffa07c699
commit
1e06710c43
@@ -1538,8 +1538,10 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi)
|
||||
dsi->slave = platform_get_drvdata(gangster);
|
||||
of_node_put(np);
|
||||
|
||||
if (!dsi->slave)
|
||||
if (!dsi->slave) {
|
||||
put_device(&gangster->dev);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
dsi->slave->master = dsi;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user