Re: [PATCH] ALSA: hda/tas2781: Fix ACPI device double put in tas2781_read_acpi()
From: Takashi Iwai
Date: Mon Sep 28 2026 - 07:07:22 EST
On Thu, 17 Sep 2026 18:45:20 +0200,
Wentao Liang wrote:
>
> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
This should have been already addressed in the commit 8bec01c80e79.
Could you verify whether there is still an issue in the latest
upstream?
thanks,
Takashi
> ---
> 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
>