Re: (subset) [PATCH 0/6] add missing of_node_put

From
Michael Ellerman <hidden>
Date
2021-11-25 09:49:40
Also in
kernel-janitors, lkml
Reply to
Julia Lawall, 2015-11-20
On Fri, 20 Nov 2015 20:33:18 +0000, Julia Lawall wrote:
The various for_each device_node iterators performs an of_node_get on each
iteration, so a break out of the loop requires an of_node_put.

The complete semantic patch that fixes this problem is
(http://coccinelle.lip6.fr):

// <smpl>
@r@
local idexpression n;
expression e1,e2;
iterator name for_each_node_by_name, for_each_node_by_type,
for_each_compatible_node, for_each_matching_node,
for_each_matching_node_and_match, for_each_child_of_node,
for_each_available_child_of_node, for_each_node_with_property;
iterator i;
statement S;
expression list [n1] es;
@@

[...]
Patch 5 applied to powerpc/next.

[5/6] powerpc/btext: add missing of_node_put
      https://git.kernel.org/powerpc/c/a1d2b210ffa52d60acabbf7b6af3ef7e1e69cda0

cheers
Thread (8 messages) 8 messages, 2 authors, last reply 2021-11-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help