* [PATCH] regcache: rbtree: Restore async flag when exiting on error
@ 2026-10-26 21:43 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2026-10-26 21:43 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel
rbtree cache syncs run with asynchronous I/O enabled, this is indicated
by setting the async flag on the regmap. During a normal exit we reset
to synchronous mode but if we exit early due to an error this restore is
missed and the regmap is left in async mode. Reset the flag on error as
well.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/base/regmap/regcache-rbtree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index e2feed6dbecf..26ac2c2a2095 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -494,8 +494,10 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
ret = regcache_sync_block(map, rbnode->block,
rbnode->cache_present,
rbnode->base_reg, start, end);
- if (ret != 0)
+ if (ret != 0) {
+ map->async = false;
return ret;
+ }
}
map->async = false;
---
base-commit: 2dee91ee94eec85d09c13c7ca83e3005906d3732
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-7.4
change-id: 20261026-regcache-rbtree-restore-sync-3ae8bf6ccfb7
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-26 21:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 21:43 [PATCH] regcache: rbtree: Restore async flag when exiting on error Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®