Skip to content

Commit e314677

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: avs: Update hda component teardown sequences
If case of failure cleanup recently created DAI and while at it, adjust the remove() operation to match operation order of the probe() function. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent e9ca3db commit e314677

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/intel/avs/pcm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,7 @@ static int avs_component_hda_probe(struct snd_soc_component *component)
15641564
if (ret < 0) {
15651565
dev_err(component->dev, "create widgets failed: %d\n",
15661566
ret);
1567+
snd_soc_unregister_dai(dai);
15671568
goto exit;
15681569
}
15691570
}
@@ -1578,8 +1579,8 @@ static int avs_component_hda_probe(struct snd_soc_component *component)
15781579

15791580
static void avs_component_hda_remove(struct snd_soc_component *component)
15801581
{
1581-
avs_component_hda_unregister_dais(component);
15821582
avs_component_remove(component);
1583+
avs_component_hda_unregister_dais(component);
15831584
}
15841585

15851586
static int avs_component_hda_open(struct snd_soc_component *component,

0 commit comments

Comments
 (0)