From: Wentao Liang <vulab@iscas.ac.cn>
To: baojun.xu@ti.com
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
perex@perex.cz, tiwai@suse.com, Wentao Liang <vulab@iscas.ac.cn>,
stable@vger.kernel.org
Subject: [PATCH] ALSA: hda/tas2781: Fix ACPI device double put in tas2781_read_acpi()
Date: Thu, 17 Sep 2026 16:45:20 +0000 [thread overview]
Message-ID: <20260917164520.2163024-1-vulab@iscas.ac.cn> (raw)
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
next reply other threads:[~2026-09-17 16:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:45 Wentao Liang [this message]
2026-09-28 11:06 ` Takashi Iwai
2026-11-08 11:42 ` Wentao Liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260917164520.2163024-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=baojun.xu@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®