mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 11:03:37 +00:00
for_each_child_of_node performs an of_node_get on each iteration, so no of_node_get is needed on breaking out of the loop when the device_node structure is saved in another variable. A simplified semantic match that finds this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root; local idexpression child; @@ for_each_child_of_node(root, child) { ... * of_node_get(child) ... break; } // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Russell King - ARM Linux <[email protected]> Cc: Thomas Petazzoni <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jason Cooper <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/11357/ Signed-off-by: Ralf Baechle <[email protected]>