1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-23 16:53:58 -05:00
linux/drivers/power/reset
Julia Lawall c4c0edfbf8 power/reset: at91-reset: add missing of_node_put
for_each_matching_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,e1;
local idexpression np;
@@

 for_each_matching_node(np, e1) {
   ... when != of_node_put(np)
       when != e = np
(
   return np;
|
+  of_node_put(np);
?  return ...;
)
   ...
 }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-12-05 02:06:49 +01:00
..
arm-versatile-reboot.c
as3722-poweroff.c
at91-poweroff.c power/reset: at91-poweroff: get and use slow clock 2015-09-22 15:18:53 +02:00
at91-reset.c power/reset: at91-reset: add missing of_node_put 2015-12-05 02:06:49 +01:00
axxia-reset.c
brcmstb-reboot.c
gpio-poweroff.c
gpio-restart.c
hisi-reboot.c
imx-snvs-poweroff.c
Kconfig power/reset: at91-poweroff: allow compiling as a module 2015-09-22 15:18:53 +02:00
keystone-reset.c
ltc2952-poweroff.c
Makefile
msm-poweroff.c
qnap-poweroff.c
restart-poweroff.c
rmobile-reset.c
st-poweroff.c
syscon-poweroff.c
syscon-reboot.c
vexpress-poweroff.c
xgene-reboot.c
zx-reboot.c