Commit 4388ae22 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'regmap-fix-v6.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap fix from Mark Brown:
 "An incremental fix for the fix introduced during the merge window for
  caching of the selector for windowed register ranges. We were
  incorrectly leaking an error code in the case where the last selector
  accessed was for some reason not cached"

* tag 'regmap-fix-v6.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: fix bogus error on regcache_sync success
parents d5c0b601 fea88064
...@@ -410,8 +410,7 @@ int regcache_sync(struct regmap *map) ...@@ -410,8 +410,7 @@ int regcache_sync(struct regmap *map)
rb_entry(node, struct regmap_range_node, node); rb_entry(node, struct regmap_range_node, node);
/* If there's nothing in the cache there's nothing to sync */ /* If there's nothing in the cache there's nothing to sync */
ret = regcache_read(map, this->selector_reg, &i); if (regcache_read(map, this->selector_reg, &i) != 0)
if (ret != 0)
continue; continue;
ret = _regmap_write(map, this->selector_reg, i); ret = _regmap_write(map, this->selector_reg, i);
......
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