linux-stable/drivers/base
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
..
firmware_loader firmware_loader: Fix memory leak in firmware upload 2022-09-01 17:47:27 +02:00
power PM: sleep: wakeirq: fix wake irq arming 2023-08-03 10:24:16 +02:00
regmap regmap: fix bogus error on regcache_sync success 2023-12-13 18:39:20 +01:00
test driver core: test_async: fix an error code 2023-09-13 09:42:53 +02:00
arch_numa.c mm: percpu: add generic pcpu_populate_pte() function 2022-01-20 08:52:52 +02:00
arch_topology.c RISC-V Patches for the 6.1 Merge Window, Part 1 2022-10-09 13:24:01 -07:00
attribute_container.c
auxiliary.c
base.h driver core: remove make_class_name declaration 2022-09-09 10:49:54 +02:00
bus.c driver: base: fix UAF when driver_attach failed 2022-05-19 19:28:42 +02:00
cacheinfo.c drivers: base: cacheinfo: Fix shared_cpu_map changes in event of CPU hotplug 2023-06-09 10:34:17 +02:00
class.c class: fix possible memory leak in __class_register() 2022-12-31 13:32:38 +01:00
component.c drivers: base: component: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:39 +01:00
container.c
core.c drivers: base: Free devm resources when unregistering a device 2023-09-13 09:42:54 +02:00
cpu.c x86/srso: Add a Speculative RAS Overflow mitigation 2023-08-08 20:03:50 +02:00
dd.c driver core: Release all resources during unbind before updating device links 2023-11-28 17:07:13 +00:00
devcoredump.c devcoredump : Serialize devcd_del work 2022-09-24 14:01:40 +02:00
devres.c devres: Slightly optimize alloc_dr() 2022-09-01 18:17:14 +02:00
devtmpfs.c devtmpfs: fix the dangling pointer of global devtmpfsd thread 2022-06-27 16:41:13 +02:00
driver.c driver core: fix driver_set_override() issue with empty strings 2022-09-05 13:01:34 +02:00
firmware.c
hypervisor.c
init.c init: Initialize noop_backing_dev_info early 2022-06-16 10:55:57 +02:00
isa.c
Kconfig
Makefile driver core: Add sysfs support for physical location of a device 2022-04-27 09:51:57 +02:00
map.c
memory.c mm: kill is_memblock_offlined() 2022-09-11 20:26:04 -07:00
module.c
node.c - Yu Zhao's Multi-Gen LRU patches are here. They've been under test in 2022-10-10 17:53:04 -07:00
physical_location.c driver core: location: Free struct acpi_pld_info *pld before return false 2023-03-10 09:33:33 +01:00
physical_location.h driver core: Add sysfs support for physical location of a device 2022-04-27 09:51:57 +02:00
pinctrl.c
platform-msi.c platform-msi: Export symbol platform_msi_create_irq_domain() 2022-09-28 14:21:05 +01:00
platform.c platform: Provide a remove callback that returns no value 2023-05-24 17:32:43 +01:00
property.c drivers: fwnode: fix fwnode_irq_get[_byname]() 2023-07-19 16:21:57 +02:00
soc.c base: soc: Make soc_device_match() simpler and easier to read 2022-03-18 14:28:07 +01:00
swnode.c
syscore.c
topology.c drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist 2022-07-15 17:36:33 +02:00
trace.c
trace.h
transport_class.c drivers: base: transport_class: fix resource leak when transport_add_device() fails 2023-03-10 09:33:34 +01:00