Julia Lawall 6bc9d9d62c clk: add missing of_node_put
for_each_matching_node_and_match 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 e1,e2,e;
local idexpression np;
@@

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

Besides the problem identified by the semantic patch, this patch adds an
of_node_get in front of saving np in a field of parent, to account for the
fact that this value will be put on going on to the next element in the
iteration, and then adds of_node_puts in the two loops where the parent
pointer can be freed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-10-21 16:16:32 -07:00
..
2015-09-08 16:48:55 -07:00
2015-10-21 16:16:32 -07:00
2015-09-04 11:35:03 -07:00
2015-09-11 16:21:12 -07:00
2015-09-27 06:45:18 -04:00
2015-09-08 14:35:59 -07:00
2015-09-03 16:41:38 -07:00
2015-09-11 16:42:39 -07:00
2015-09-08 17:22:35 -07:00
2015-09-26 20:53:15 -04:00
2015-09-08 16:33:16 -07:00
2015-09-09 11:17:33 -07:00
2015-09-25 11:16:53 -07:00
2015-09-17 21:41:02 -07:00
2015-09-09 10:55:32 -07:00
2015-09-05 19:37:31 +02:00
2015-09-18 09:28:20 -07:00
2015-09-21 12:02:27 -07:00
2015-09-26 20:56:50 -04:00
2015-09-18 09:28:20 -07:00