Skip to content

Commit 1c80cc0

Browse files
committed
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: 5be27f1 ("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>
1 parent 5fadc94 commit 1c80cc0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
118118

119119
err:
120120
dev_err(p->dev, "read acpi error, ret: %d\n", ret);
121-
put_device(physdev);
121+
acpi_dev_put(adev);
122122

123123
return ret;
124124
}

0 commit comments

Comments
 (0)