Commit 221e3638 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Thierry Reding

drm/tegra: Fix reference leak in tegra_dsi_ganged_probe

The reference taken by 'of_find_device_by_node()' must be released when
not needed anymore. Add put_device() call to fix this.

Fixes: e94236cd ("drm/tegra: dsi: Add ganged mode support")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent f07f04a5
...@@ -1538,8 +1538,10 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi) ...@@ -1538,8 +1538,10 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi)
dsi->slave = platform_get_drvdata(gangster); dsi->slave = platform_get_drvdata(gangster);
of_node_put(np); of_node_put(np);
if (!dsi->slave) if (!dsi->slave) {
put_device(&gangster->dev);
return -EPROBE_DEFER; return -EPROBE_DEFER;
}
dsi->slave->master = dsi; dsi->slave->master = dsi;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment