summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorSimon Trimmer <simont@opensource.cirrus.com>2024-03-25 17:55:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-10 17:37:55 +0300
commitd6f9062187ae97362c67bdb2ab27e7f5e7cb64a9 (patch)
treefa059f9e80c9d0c8dc074e6efdfdf03af8fb4373 /sound
parentcdb0a1fbf79bacce525371bce03eb98627e24f34 (diff)
downloadlinux-d6f9062187ae97362c67bdb2ab27e7f5e7cb64a9.tar.xz
ALSA: hda: cs35l56: Set the init_done flag before component_add()
[ Upstream commit cafe9c6a72cf1ffe96d2561d988a141cb5c093db ] Initialization is completed before adding the component as that can start the process of the device binding and trigger actions that check init_done. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Message-ID: <20240325145510.328378-1-rf@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/cs35l56_hda.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index 75a14ba54fcd..43a445bd961f 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -1017,14 +1017,14 @@ int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int id)
pm_runtime_mark_last_busy(cs35l56->base.dev);
pm_runtime_enable(cs35l56->base.dev);
+ cs35l56->base.init_done = true;
+
ret = component_add(cs35l56->base.dev, &cs35l56_hda_comp_ops);
if (ret) {
dev_err(cs35l56->base.dev, "Register component failed: %d\n", ret);
goto pm_err;
}
- cs35l56->base.init_done = true;
-
return 0;
pm_err: