linux-stable/drivers/base/regmap
Matthias Reichl bcd50a3bd6 regmap: fix bogus error on regcache_sync success
commit fea8806444 upstream.

Since commit 0ec7731655 ("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: 0ec7731655 ("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>
2023-12-13 18:39:20 +01:00
..
internal.h regmap: Add bulk read/write callbacks into regmap_config 2022-05-05 13:22:34 +01:00
Kconfig regmap: Add MDIO bus support 2021-05-19 14:19:10 +01:00
Makefile regmap: Add MDIO bus support 2021-05-19 14:19:10 +01:00
regcache-flat.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regcache-lzo.c regmap: lzo: Switch to bitmap_zalloc() 2019-06-17 15:18:44 +01:00
regcache-rbtree.c regmap: rbtree: Fix wrong register marked as in-cache when creating new node 2023-10-10 22:00:41 +02:00
regcache.c regmap: fix bogus error on regcache_sync success 2023-12-13 18:39:20 +01:00
regmap-ac97.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regmap-debugfs.c regmap: debugfs: Fix a erroneous check after snprintf() 2023-11-20 11:51:55 +01:00
regmap-i2c.c regmap: Account for register length in SMBus I/O limits 2023-07-27 08:50:26 +02:00
regmap-i3c.c regmap: Constify static regmap_bus structs 2022-04-04 08:41:50 +01:00
regmap-irq.c regmap-irq: Fix out-of-bounds access when allocating config buffers 2023-07-23 13:49:44 +02:00
regmap-mdio.c net: Convert more users of mdiobus_* to mdiodev_* 2021-10-24 13:40:33 +01:00
regmap-mmio.c regmap: mmio: replace return 0 with break in switch statement 2022-09-22 12:33:18 +01:00
regmap-sccb.c regmap: Constify static regmap_bus structs 2022-04-04 08:41:50 +01:00
regmap-sdw-mbq.c regmap: Constify static regmap_bus structs 2022-04-04 08:41:50 +01:00
regmap-sdw.c regmap: Constify static regmap_bus structs 2022-04-04 08:41:50 +01:00
regmap-slimbus.c regmap: Constify static regmap_bus structs 2022-04-04 08:41:50 +01:00
regmap-spi-avmm.c regmap: Drop initial version of maximum transfer length fixes 2023-07-27 08:50:26 +02:00
regmap-spi.c regmap: spi: Reserve space for register address/padding 2022-08-18 15:02:05 +01:00
regmap-spmi.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regmap-w1.c regmap: Constify static regmap_bus structs 2022-04-04 08:41:50 +01:00
regmap.c regmap: prevent noinc writes from clobbering cache 2023-11-20 11:52:15 +01:00
trace.h regmap: trace: Remove unneeded blank lines 2022-09-05 13:09:45 +01:00