From: Cezary Rojewski Date: Thu, 9 Jan 2025 12:22:08 +0000 (+0100) Subject: ASoC: Intel: avs: Update hda component teardown sequences X-Git-Tag: v6.14-rc1~111^2~7^2~14^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3146775f05d18c667a2e26082da3ac105f87d9f;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20250109122216.3667847-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c index 945f9c0a6a545..5878cfdbbee50 100644 --- a/sound/soc/intel/avs/pcm.c +++ b/sound/soc/intel/avs/pcm.c @@ -1564,6 +1564,7 @@ static int avs_component_hda_probe(struct snd_soc_component *component) if (ret < 0) { dev_err(component->dev, "create widgets failed: %d\n", ret); + snd_soc_unregister_dai(dai); goto exit; } } @@ -1578,8 +1579,8 @@ exit: static void avs_component_hda_remove(struct snd_soc_component *component) { - avs_component_hda_unregister_dais(component); avs_component_remove(component); + avs_component_hda_unregister_dais(component); } static int avs_component_hda_open(struct snd_soc_component *component,