mfd: Fix off-by-one value range checking for tps65912_i2c_write
authorAxel Lin <axel.lin@gmail.com>
Fri, 24 Jun 2011 07:34:16 +0000 (15:34 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 31 Jul 2011 21:28:25 +0000 (23:28 +0200)
commit63c8a58d226a0701272b54015a8d73643d72cd3d
tree016d6f2ca080a9cd694a8b41ddca96273d8c4ac3
parenta5e06781f073842beb81d088eb787f0ea23d6499
mfd: Fix off-by-one value range checking for tps65912_i2c_write

If bytes == (TPS6591X_MAX_REGISTER + 1), we have a buffer overflow when
doing memcpy(&msg[1], src, bytes).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/tps65912-i2c.c