From: Grant Likely Date: Wed, 19 Nov 2014 16:22:32 +0000 (+0000) Subject: of/selftest: Fix off-by-one error in removal path X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~87^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1a2086e2d;p=pandora-kernel.git of/selftest: Fix off-by-one error in removal path The removal path for selftest data has an off by one error that causes the code to dereference beyond the end of the nodes[] array on the first pass through. The old code only worked by chance on a lot of platforms, but the bug was recently exposed on aarch64. The fix is simple. Decrement the node count before dereferencing, not after. Reported-by: Kevin Hilman Cc: Rob Herring Cc: Gaurav Minocha Cc: # v3.17+ --- Reading git-diff-tree failed