mirror of https://gitee.com/openkylin/linux.git
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:
parent
a0941e562e
commit
f9353e70bc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue