summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-12-07 12:30:54 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2023-12-07 12:30:54 -0800
commit4388ae22aeaa1cd2f74edaa5cf5a518cc5f04c56 (patch)
treec7317a59dc2279df90f70ac055f9e1acc7cbd7c0 /drivers
parentd5c0b601453483f3068b9b06e13f83ea546c36e6 (diff)
parentfea88064445a59584460f7f67d102b6e5fc1ca1d (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/regmap/regcache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 92592f944a3d..ac63a73ccdaa 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -410,8 +410,7 @@ out:
rb_entry(node, struct regmap_range_node, node);
/* If there's nothing in the cache there's nothing to sync */
- ret = regcache_read(map, this->selector_reg, &i);
- if (ret != 0)
+ if (regcache_read(map, this->selector_reg, &i) != 0)
continue;
ret = _regmap_write(map, this->selector_reg, i);