dect
/
linux-2.6
Archived
13
0
Fork 0

regmap: Fix rbtree block base in sync

Otherwise we'll end up running with bogus register numbers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Mark Brown 2012-03-05 23:28:49 +00:00
parent a0941e562e
commit f9353e70bc
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
if (rbnode->base_reg + rbnode->blklen < min)
continue;
if (min < rbnode->base_reg + rbnode->blklen)
if (min > rbnode->base_reg)
base = min - rbnode->base_reg;
else
base = 0;