From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: Yuansheng Yang <0xbeac@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Mark Brown <broonie@kernel.org>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
sound-open-firmware@alsa-project.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] ASoC: SOF: Intel: hda-codec: fix double put_device() on registration error
Date: Fri, 4 Dec 2026 12:34:31 +0200 (EET) [thread overview]
Message-ID: <6fb106ff-7be4-1e11-bba4-66d78bec7d40@linux.intel.com> (raw)
In-Reply-To: <20261203190051.456176-1-0xbeac@gmail.com>
Hey,
On Fri, 4 Dec 2026, Yuansheng Yang wrote:
> When probing an HD-audio codec, hda_codec_probe() allocates the codec
> via hda_codec_device_init() -> snd_hda_codec_device_init() ->
> snd_hdac_device_init(), which initializes the embedded device reference
> count (kref == 1) and inserts the codec into bus->codec_list and
> bus->caddr_tbl[] without taking an additional device reference.
[..]
> --- a/sound/soc/sof/intel/hda-codec.c
> +++ b/sound/soc/sof/intel/hda-codec.c
> @@ -57,7 +57,6 @@ static int hda_codec_load_module(struct hda_codec *codec)
> ret = snd_hdac_device_register(&codec->core);
> if (ret) {
> dev_err(&codec->core.dev, "failed to register hdac device\n");
> - put_device(&codec->core.dev);
> return ret;
> }
the commit is very verbose, but analysis and fix are correct, so:
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Br, Kai
prev parent reply other threads:[~2026-12-04 10:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 19:00 [PATCH] ASoC: SOF: Intel: hda-codec: fix double put_device() on registration error Yuansheng Yang
2026-12-04 10:34 ` Kai Vehmanen [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=6fb106ff-7be4-1e11-bba4-66d78bec7d40@linux.intel.com \
--to=kai.vehmanen@linux.intel.com \
--cc=0xbeac@gmail.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=sound-open-firmware@alsa-project.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.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