diff options
| author | Matthias Reichl <hias@horus.com> | 2023-12-03 23:22:16 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-13 18:39:20 +0100 |
| commit | bcd50a3bd637cece5303d4824485b89ce5c9871a (patch) | |
| tree | 86ed0daeed0f9e027e8cc865eff990828b88483a /drivers/platform | |
| parent | 1c1c6d5c7e14c98336433195de5de38ab16116d6 (diff) | |
| download | linux-bcd50a3bd637cece5303d4824485b89ce5c9871a.tar.gz linux-bcd50a3bd637cece5303d4824485b89ce5c9871a.tar.bz2 linux-bcd50a3bd637cece5303d4824485b89ce5c9871a.zip | |
regmap: fix bogus error on regcache_sync success
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@vger.kernel.org
Signed-off-by: Matthias Reichl <hias@horus.com>
Link: https://lore.kernel.org/r/20231203222216.96547-1-hias@horus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform')
0 files changed, 0 insertions, 0 deletions
