]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: codecs: hda: Fix RPM usage count underflow
authorCezary Rojewski <cezary.rojewski@intel.com>
Fri, 30 May 2025 14:10:17 +0000 (16:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 13:32:20 +0000 (15:32 +0200)
commit3668296690e40e84a77ba2b837eb50fa67aa1323
treea15c9bc1e152b66af2523b12396bea1a8c95583c
parent1cda72119b311ba9791d8a96eabd54158dfbb5aa
ASoC: codecs: hda: Fix RPM usage count underflow

[ Upstream commit ff0045de4ee0288dec683690f66f2f369b7d3466 ]

RPM manipulation in hda_codec_probe_complete()'s error path is
superfluous and leads to RPM usage count underflow if the
build-controls operation fails.

hda_codec_probe_complete() is called in:

1) hda_codec_probe() for all non-HDMI codecs
2) in card->late_probe() for HDMI codecs

Error path for hda_codec_probe() takes care of bus' RPM already.
For 2) if late_probe() fails, ASoC performs card cleanup what
triggers hda_codec_remote() - same treatment is in 1).

Fixes: b5df2a7dca1c ("ASoC: codecs: Add HD-Audio codec driver")
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250530141025.2942936-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/hda.c