linux/arch/powerpc/platforms/embedded6xx
Julia Lawall f6e82647ff powerpc/6xx: add missing of_node_put
for_each_compatible_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// <smpl>
@@
expression e;
local idexpression n;
@@

@@
local idexpression n;
expression e;
@@

 for_each_compatible_node(n,...) {
   ...
(
   of_node_put(n);
|
   e = n
|
+  of_node_put(n);
?  break;
)
   ...
 }
... when != n
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1448051604-25256-2-git-send-email-Julia.Lawall@lip6.fr
2021-11-25 11:25:29 +11:00
..
flipper-pic.c powerpc: Add missing linux/{of.h,irqdomain.h} include directives 2021-06-10 13:09:16 +01:00
flipper-pic.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gamecube.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hlwd-pic.c powerpc/6xx: add missing of_node_put 2021-11-25 11:25:29 +11:00
hlwd-pic.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
holly.c powerpc: Refactor verification of MSR_RI 2021-08-26 21:21:07 +10:00
Kconfig powerpc/embedded6xx: Remove CONFIG_MV64X60 2021-03-29 13:22:17 +11:00
linkstation.c powerpc/embedded6xx/linkstation: Move PHB discovery 2021-02-09 00:02:07 +11:00
ls_uart.c
Makefile powerpc/embedded6xx: Remove C2K board support 2018-06-04 00:39:22 +10:00
mpc10x.h powerpc32: remove ioremap_base 2016-03-11 17:18:02 -06:00
mpc7448_hpc2.c powerpc: Refactor verification of MSR_RI 2021-08-26 21:21:07 +10:00
mvme5100.c powerpc/embedded6xx/mve5100: Move PHB discovery 2021-02-09 00:02:07 +11:00
storcenter.c powerpc/embedded6xx/mve5100: Move PHB discovery 2021-02-09 00:02:07 +11:00
usbgecko_udbg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
usbgecko_udbg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
wii.c powerpc/wii: Fix declaration made after definition 2020-05-20 23:39:56 +10:00