This is a note to let you know that I've just added the patch titled regmap: fix bogus error on regcache_sync success to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: regmap-fix-bogus-error-on-regcache_sync-success.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From fea88064445a59584460f7f67d102b6e5fc1ca1d Mon Sep 17 00:00:00 2001 From: Matthias Reichl <hias@xxxxxxxxx> Date: Sun, 3 Dec 2023 23:22:16 +0100 Subject: regmap: fix bogus error on regcache_sync success From: Matthias Reichl <hias@xxxxxxxxx> commit fea88064445a59584460f7f67d102b6e5fc1ca1d upstream. Since commit 0ec7731655de ("regmap: Ensure range selector registers are updated after cache sync") opening pcm512x based soundcards fail with EINVAL and dmesg shows sync cache and pm_runtime_get errors: [ 228.794676] pcm512x 1-004c: Failed to sync cache: -22 [ 228.794740] pcm512x 1-004c: ASoC: error at snd_soc_pcm_component_pm_runtime_get on pcm512x.1-004c: -22 This is caused by the cache check result leaking out into the regcache_sync return value. Fix this by making the check local-only, as the comment above the regcache_read call states a non-zero return value means there's nothing to do so the return value should not be altered. Fixes: 0ec7731655de ("regmap: Ensure range selector registers are updated after cache sync") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Matthias Reichl <hias@xxxxxxxxx> Link: https://lore.kernel.org/r/20231203222216.96547-1-hias@xxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/base/regmap/regcache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -404,8 +404,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); Patches currently in stable-queue which might be from hias@xxxxxxxxx are queue-5.15/regmap-fix-bogus-error-on-regcache_sync-success.patch