regmap: Add raw_write/read checks for max_raw_write/read sizes
authorMarkus Pargmann <mpa@pengutronix.de>
Sun, 30 Aug 2015 07:33:55 +0000 (09:33 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 30 Aug 2015 09:19:22 +0000 (10:19 +0100)
commitc335931ed9d22c30017cf957518262c2fe6502ce
treed5468748135748a6bad1e728af55adb7af909b53
parentf50c9eb4e9304cf555206c93152f580c0e7213b2
regmap: Add raw_write/read checks for max_raw_write/read sizes

Check in regmap_raw_read() and regmap_raw_write() for correct maximum
sizes of the operations. Return -E2BIG if this size is not supported
because it is too big.

Also this patch causes an uninitialized variable warning so it
initializes ret (although not necessary).

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c