bus: vexpress-config: fix device node reference leak in vexpress_syscfg_probe
Subsystems (2)
PATCH 1/1 bus: vexpress-config: fix device node reference leak in vexpress_syscfg_probe
Add missing of_node_put() call to release
the device node reference obtained via of_parse_phandle().
Since we don't actually use the node, decrement the reference count immediately after obtaining it.
Fixes a5a38765ac79 ("bus: vexpress-config: simplify config bus probing")
Signed-off-by Miaoqian Lin <[email protected]>
--- drivers/bus/vexpress-config.c | 1 + 1 file changed, 1 insertion(+)
drivers/bus/vexpress-config.c +1 -0
@@ -393,6 +393,7 @@ static int vexpress_syscfg_probe(struct platform_device *pdev)struct device_node *bridge_np; bridge_np =of_parse_phandle (node,"arm,vexpress,config-bridge" ,0 ); +of_node_put (bridge_np);if (bridge_np != pdev->dev.parent->of_node)continue ;
Signature · 1 line
2.35.1
Quoted 2 lines
Add missing
of_node_put()call to release
the device node reference obtained viaof_parse_phandle().
…
You may occasionally put more than 58 characters into text lines of such a change description.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc4#n638
Regards,
Markus