Commit f9353e70 authored by Mark Brown's avatar Mark Brown

regmap: Fix rbtree block base in sync

Otherwise we'll end up running with bogus register numbers.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a0941e56
...@@ -379,7 +379,7 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min, ...@@ -379,7 +379,7 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
if (rbnode->base_reg + rbnode->blklen < min) if (rbnode->base_reg + rbnode->blklen < min)
continue; continue;
if (min < rbnode->base_reg + rbnode->blklen) if (min > rbnode->base_reg)
base = min - rbnode->base_reg; base = min - rbnode->base_reg;
else else
base = 0; base = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment