regmap: validate regmap_raw_read/write val_len
authorStephen Warren <swarren@nvidia.com>
Fri, 6 Apr 2012 21:16:03 +0000 (15:16 -0600)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 05:36:52 +0000 (10:36 +0530)
commitc803972821aa3688a5002b34c488bad6e93b6a26
tree44bbbda87896dbc9b3e70eb00205ac8649028788
parent5ddea9eb18f122345326388b49d4a4085a008cec
regmap: validate regmap_raw_read/write val_len

val_len should be a multiple of val_bytes. If it's not, error out early.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 851960ba7cb38a6a108d102e4c8b0ab702972e22)

Change-Id: Ic17d4bd832b5ea3e426d00ff5d0ae342b8abba45
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/96507
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
drivers/base/regmap/regmap.c