memory: tegra: fix device_node leak in tegra186_mc_probe_device()
Subsystems (2)
PATCH 1/1 memory: tegra: fix device_node leak in tegra186_mc_probe_device()
tegra186_mc_probe_device() iterates over the "interconnects" phandles using of_parse_phandle_with_args(), which increments the reference count of args.np on each successful call, but never drops the reference with of_node_put(args.np).
Call of_node_put(args.np) at the end of each loop iteration.
--- drivers/memory/tegra/tegra186.c | 1 + 1 file changed, 1 insertion(+)
drivers/memory/tegra/tegra186.c +1 -0
@@ -146,6 +146,7 @@ static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev) } } +of_node_put (args.np); index++; }#endif
Signature · 1 line
2.56.0
Quoted 8 lines · Selby Mashiki
tegra186_mc_probe_device()iterates over the "interconnects" phandles usingof_parse_phandle_with_args(), which increments the reference count of args.np on each successful call, but never drops the reference withof_node_put(args.np).Call
of_node_put(args.np)at the end of each loop iteration.[...]
Applied, thanks!
[1/1] memory: tegra: fix device_node leak in tegra186_mc_probe_device()
https://git.kernel.org/krzk/linux-mem-ctrl/c/3de6a98362e7c833ba78f5928890744ca9187cdc
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>