regmap: regcache-rbtree: Fix present bitmap resize
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 7 Mar 2015 16:10:01 +0000 (17:10 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 17 Apr 2015 00:11:28 +0000 (20:11 -0400)
commit7ac888f30de90af52f25c5b851e66e9016b3c33f
tree2bedfe69a8c5280858ee9eb726dc659fa8b8c55a
parent5820c59b7d2b67f3ffadfb88d85dd2ce81b1241f
regmap: regcache-rbtree: Fix present bitmap resize

[ Upstream commit 328f494d95aac8bd4896aea2328bc281053bcb71 ]

When inserting a new register into a block at the lower end the present
bitmap is currently shifted into the wrong direction. The effect of this is
that the bitmap becomes corrupted and registers which are present might be
reported as not present and vice versa.

Fix this by shifting left rather than right.

Fixes: 472fdec7380c("regmap: rbtree: Reduce number of nodes, take 2")
Reported-by: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/base/regmap/regcache-rbtree.c