summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorXu Rao <raoxu@uniontech.com>2026-07-31 11:35:54 +0800
committerTakashi Iwai <tiwai@suse.de>2026-08-03 08:56:42 +0200
commit8bec01c80e798eca1ae7863cf29bc6befd759db7 (patch)
tree8e8458114fac4d88cc7ca5aa5146a2b7525a314d /tools/perf/scripts/python
parent2b6e56b848fcbe82d297805c927f4556123e5039 (diff)
ALSA: hda/tas2781: fix ACPI reference handling
tas2781_read_acpi() gets a reference to the matching ACPI device and then looks up its first physical device node. After taking a reference to the physical device, it immediately drops the ACPI device reference. However, every later failure jumps to an error path that drops the ACPI device reference a second time. This unbalances the reference count and may prematurely release the ACPI device. In addition, acpi_get_first_physical_node() may return NULL. Without a check, the driver passes the NULL physical device to the property helper calls and may dereference it. Return -ENODEV when no physical device is associated with the ACPI node, and remove the duplicate acpi_dev_put() from the common error path. Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Cc: stable@vger.kernel.org Signed-off-by: Xu Rao <raoxu@uniontech.com> Link: https://patch.msgid.link/97EA8F29DA0D9AF7+20260731033554.949564-1-raoxu@uniontech.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions