[PATCH 07/20] ASoC: Intel: sof_cirrus_common: Fix device reference leak in cs35l41_compute_codec_conf()

From: Wentao Liang

Date: Wed Sep 16 2026 - 03:20:11 EST


In cs35l41_compute_codec_conf(), get_device() is called on the physical
node returned by acpi_get_first_physical_node() to populate the device
name strings. However, this extra reference is never dropped, leaking
a reference count for each matched ACPI device.

acpi_get_first_physical_node() returns a borrowed reference that is
valid while the device exists. Remove the unnecessary get_device() call.

Fixes: 1ca726424a12 ("ASoC: Intel: cirrus-common: Use UID to map correct amp to prefix")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
---
sound/soc/intel/boards/sof_cirrus_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/sof_cirrus_common.c b/sound/soc/intel/boards/sof_cirrus_common.c
index 88fc6cb2bfd4..2d23e16bd206 100644
--- a/sound/soc/intel/boards/sof_cirrus_common.c
+++ b/sound/soc/intel/boards/sof_cirrus_common.c
@@ -168,7 +168,7 @@ static int cs35l41_compute_codec_conf(void)
cs35l41_name_prefixes[uid]);
continue;
}
- physdev = get_device(acpi_get_first_physical_node(adev));
+ physdev = acpi_get_first_physical_node(adev);
acpi_dev_put(adev);
if (!physdev) {
pr_devel("Cannot find physical node for HID %s UID %u (%s)\n", CS35L41_HID,
--
2.34.1