Skip to content

Commit

Permalink
ALSA: hda: cs35l56: Set the init_done flag before component_add()
Browse files Browse the repository at this point in the history
[ Upstream commit cafe9c6 ]

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: 73cfbfa ("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>
  • Loading branch information
Simon Trimmer authored and gregkh committed Apr 10, 2024
1 parent dc1ec9c commit 0172edc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/hda/cs35l56_hda.c
Expand Up @@ -978,14 +978,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:
Expand Down

0 comments on commit 0172edc

Please sign in to comment.