Otherwise we'll end up running with bogus register numbers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
@@ -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;