From: Julia Lawall Date: Thu, 13 Dec 2007 23:56:15 +0000 (-0800) Subject: [POWERPC] arch/powerpc: Add missing of_node_put X-Git-Tag: v2.6.25-rc1~1131^2~225 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af449c330eb39ae57b139832181d0dcf3b94d806;p=pandora-kernel.git [POWERPC] arch/powerpc: Add missing of_node_put There should be an of_node_put when breaking out of a loop that iterates over calls to of_find_all_nodes, as this function does an of_node_get on the value it returns. This was fixed using the following semantic patch. (http://www.emn.fr/x-info/coccinelle/) // @@ type T; identifier d; expression e; @@ T *d; ... for (d = NULL; (d = of_find_all_nodes(d)) != NULL; ) {... when != of_node_put(d) when != e = d ( return d; | + of_node_put(d); ? return ...; ) ...} // Signed-off-by: Julia Lawall Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed