mfd: Fix error in wm8400 reg cache access check
authorPhil Carmody <ext-phil.2.carmody@nokia.com>
Fri, 16 Apr 2010 12:00:09 +0000 (15:00 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 27 May 2010 23:37:40 +0000 (01:37 +0200)
Accessing num_reg elements in the interval [reg .. reg+num_regs)
is permitted if (reg+numregs <= array size), so barf when that
excluded upper bound is > array size. The prior -1 would give
access to one too many elements.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm8400-core.c

Simple merge