mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
regcache: Make sure we sync register 0 in an rbtree cache
Most of the current users have register 0 as a volatile register or don't have a register 0 so it's not been apparent that it's not getting synced. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
19694b5ea1
commit
994f5db65e
1 changed files with 1 additions and 1 deletions
|
@ -377,7 +377,7 @@ static int regcache_rbtree_sync(struct regmap *map)
|
|||
|
||||
/* Is this the hardware default? If so skip. */
|
||||
ret = regcache_lookup_reg(map, i);
|
||||
if (ret > 0 && val == map->reg_defaults[ret].def)
|
||||
if (ret >= 0 && val == map->reg_defaults[ret].def)
|
||||
continue;
|
||||
|
||||
map->cache_bypass = 1;
|
||||
|
|
Loading…
Reference in a new issue