regmap: fix writes to non incrementing registers
authorBen Whitten <ben.whitten@gmail.com>
Sat, 18 Jan 2020 20:56:24 +0000 (20:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:34:19 +0000 (16:34 -0500)
commit3b9586e82c90d34caa30f6b763820eddce93ae44
tree10065940e71a9e94a20704f4ce614a4aa7e8e497
parent4eb12ef7491d76506549b61704c6a62cc545a307
regmap: fix writes to non incrementing registers

commit 2e31aab08bad0d4ee3d3d890a7b74cb6293e0a41 upstream.

When checking if a register block is writable we must ensure that the
block does not start with or contain a non incrementing register.

Fixes: 8b9f9d4dc511 ("regmap: verify if register is writeable before writing operations")
Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
Link: https://lore.kernel.org/r/20200118205625.14532-1-ben.whitten@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/regmap/regmap.c