mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/tas2781: Fix ACPI device double put in tas2781_read_acpi()
@ 2026-09-17 16:45 Wentao Liang
  2026-09-28 11:06 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Wentao Liang @ 2026-09-17 16:45 UTC (permalink / raw)
  To: baojun.xu; +Cc: linux-kernel, linux-sound, perex, tiwai, Wentao Liang, stable

The reference returned by acpi_dev_get_first_match_dev() is already
released right after the physical node is looked up. The adev variable
is not reassigned afterwards, so the acpi_dev_put() on the err path is a
second, spurious put of the same device, which unbalances the reference
count, or frees the device while physdev may still be in use.

Drop the redundant acpi_dev_put() from the error path.

Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 sound/hda/codecs/side-codecs/tas2781_hda_spi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
index 0e4f3553f273..63f8b15c2d8c 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
@@ -386,7 +386,6 @@ static int tas2781_read_acpi(struct tas2781_hda *tas_hda,
 err:
 	dev_err(p->dev, "read acpi error, ret: %d\n", ret);
 	put_device(physdev);
-	acpi_dev_put(adev);
 
 	return ret;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-28 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 16:45 [PATCH] ALSA: hda/tas2781: Fix ACPI device double put in tas2781_read_acpi() Wentao Liang
2026-09-28 11:06 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®