From: Grant Likely Date: Fri, 4 Oct 2013 16:24:26 +0000 (+0100) Subject: of: Fix iteration bug over CPU reg properties X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~9^2~4^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3cea45a77c8ebdb7efad100e576eb6cb401bf25;p=pandora-kernel.git of: Fix iteration bug over CPU reg properties The size of each hwid in a cpu nodes 'reg' property is defined by the parents #address-cells property in the normal way. The cpu parsing code has a bug where it will overrun the end of the property if address-cells is greater than one. This commit fixes the problem by adjusting the array size by the number of address cells. It also makes sure address-cells isn't zero for that would cause an infinite loop. v2: bail if #address-cells is zero instead of forcing to OF_ROOT_NODE_ADDR_CELLS_DEFAULT. Forcing it will cause the reg property to be parsed incorrectly. Signed-off-by: Grant Likely Cc: Rob Herring Cc: Benjamin Herrenschmidt --- Reading git-diff-tree failed