ALSA: hda: cs35l41: Fix unbalanced pm_runtime_get()
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Thu, 7 Sep 2023 17:10:08 +0000 (20:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:52:04 +0000 (11:52 +0100)
commit2d81896fe161dbffb96c053b0afa7fab9bb2875f
tree97890081a2ad1a3f185853d2d51f23b7be4e20fe
parent06421269133f4539b22c49731a9d334d66ace3dd
ALSA: hda: cs35l41: Fix unbalanced pm_runtime_get()

[ Upstream commit 486465508f8a5fe441939a7d97607f4460a60891 ]

If component_add() fails, probe() returns without calling
pm_runtime_put(), which leaves the runtime PM usage counter incremented.

Fix the issue by jumping to err_pm label and drop the now unnecessary
pm_runtime_disable() call.

Fixes: 7b2f3eb492da ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230907171010.1447274-10-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/hda/cs35l41_hda.c