regmap: validate regmap_raw_read/write val_len
authorStephen Warren <swarren@nvidia.com>
Fri, 6 Apr 2012 21:16:03 +0000 (15:16 -0600)
committerSimone Willett <swillett@nvidia.com>
Sun, 15 Apr 2012 21:41:12 +0000 (14:41 -0700)
commit42e1ce3fb12b89554afeb79183c2a6ca64a83eb2
tree0189991088231f1ca01ad582bfac082f696406b0
parent1e14348bd67a4064ea0b9f023ce1f941a13e6788
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