From: Jonathan Cameron Date: Fri, 9 Sep 2011 08:53:05 +0000 (+0100) Subject: staging:iio:light: V3 fix out of bounds reg_cache[] access X-Git-Tag: v3.2-rc1~169^2^2~572 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25d7315a19bae4c880ca25b75fe8c632b79a21b7;p=pandora-kernel.git staging:iio:light: V3 fix out of bounds reg_cache[] access V3 is a straightforward forward port to teh current tree of V2. Simple fix is to just not cache REG_TEST (offset 8). Cache doesn't help REG_TEST anyway since we write all 8 bits exactly once (at resume/init time). Also fix an "off-by-one" allocation of reg_cache[] array size that was in the original code before I touched it. Reported-by: Dan Carpenter Signed-off-by: Grant Grundler Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed