mirror of https://github.com/torvalds/linux.git
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; @@ for_each_compatible_node(n,...) { ... when != of_node_put(n) when != e = n ( return n; | + of_node_put(n); ? return ...; ) ... } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| bmi.c | ||
| bmi.h | ||
| cfg80211.c | ||
| cfg80211.h | ||
| common.h | ||
| core.c | ||
| core.h | ||
| debug.c | ||
| debug.h | ||
| hif-ops.h | ||
| hif.c | ||
| hif.h | ||
| htc-ops.h | ||
| htc.h | ||
| htc_mbox.c | ||
| htc_pipe.c | ||
| init.c | ||
| main.c | ||
| recovery.c | ||
| sdio.c | ||
| target.h | ||
| testmode.c | ||
| testmode.h | ||
| trace.c | ||
| trace.h | ||
| txrx.c | ||
| usb.c | ||
| wmi.c | ||
| wmi.h | ||