mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: baojun.xu@ti.com, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org, perex@perex.cz, tiwai@suse.com,
	stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda/tas2781: Fix ACPI device double put in tas2781_read_acpi()
Date: Mon, 28 Sep 2026 13:06:59 +0200	[thread overview]
Message-ID: <87eced7hyk.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260917164520.2163024-1-vulab@iscas.ac.cn>

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@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

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
> 

      reply	other threads:[~2026-09-28 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 16:45 Wentao Liang
2026-09-28 11:06 ` Takashi Iwai [this message]

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=87eced7hyk.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --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 \
    --cc=vulab@iscas.ac.cn \
    /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®