提交 f9353e70 编写于 作者: M Mark Brown

regmap: Fix rbtree block base in sync

Otherwise we'll end up running with bogus register numbers.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部