Re: [PATCH] ALSA: hda/tas2781: fix ACPI reference handling
Takashi Iwai <[email protected]> Mon, 03 Aug 2026 08:58:25 +0200
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 31 Jul 2026 05:35:54 +0200, raoxu wrote: > > From: Xu Rao <[email protected]> > > 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: [email protected] > Signed-off-by: Xu Rao <[email protected]> Applied now. Thanks. Takashi