2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 15:13:55 +08:00
linux-next/drivers/net/ethernet/cavium
Julia Lawall 8c387ebbaf net: thunderx: add missing of_node_put
for_each_child_of_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>
@@
local idexpression r.n;
expression r,e;
@@

 for_each_child_of_node(r,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: David S. Miller <davem@davemloft.net>
2015-10-26 22:08:07 -07:00
..
liquidio net: cavium: liquidio: use kzalloc in setup_glist() 2015-09-09 17:06:00 -07:00
thunder net: thunderx: add missing of_node_put 2015-10-26 22:08:07 -07:00
Kconfig net: cavium: change NET_VENDOR_CAVIUM to bool 2015-10-21 19:12:16 -07:00
Makefile Add support of Cavium Liquidio ethernet adapters 2015-06-10 22:44:08 -07:00