ALSA: hda/tas2781: Fix acpi device refcount leak at tas2781_read_acpi()
authorTakashi Iwai <tiwai@suse.de>
Sun, 20 Aug 2023 17:26:34 +0000 (19:26 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 21 Aug 2023 14:20:54 +0000 (16:20 +0200)
commit1c80cc055b3f9fb72606d58c27eb2486c4b919a7
tree05a61fa7687449ed0b932602c9b0a8b4ac273a5f
parent5fadc941d07530d681f3b7ec91e56d8445bc3825
ALSA: hda/tas2781: Fix acpi device refcount leak at tas2781_read_acpi()

The error path at tas2781_read_acpi() doesn't release the acpi_device
adev but releases another device physdev instead.  This results in a
refcount leak.  Fix it by replacing with the right object.

Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Closes: https://lore.kernel.org/r/9f910785-e856-1539-e3e4-c9817af5fe67@linux.intel.com
Link: https://lore.kernel.org/r/20230820172635.22236-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/tas2781_hda_i2c.c