From: Laurent Pinchart Date: Wed, 21 May 2014 13:31:05 +0000 (+0200) Subject: ARM: shmobile: Fix device node reference leakage in shmobile_init_delay X-Git-Tag: omap-for-v3.17/fixes-against-rc2~122^2~37^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edc8fb1d6ebdfc4efa009073586d3567c3368475;p=pandora-kernel.git ARM: shmobile: Fix device node reference leakage in shmobile_init_delay The of_find_compatible_node() function returns a new reference to the found node. Instead of just adding of_node_put() calls, simplify the code by moving the CPU identification logic inside the loop over cpu nodes, in order to lower complexity from O(n) to O(1) by replacing of_find_compatible_node() calls with of_device_is_compatible(). Signed-off-by: Laurent Pinchart Acked-by: Magnus Damm Signed-off-by: Simon Horman --- Reading git-diff-tree failed