ASoC: mediatek: mt8173: Fix snd_soc_component_initialize error path
authorRicardo Ribalda Delgado <ribalda@chromium.org>
Mon, 12 Jun 2023 09:05:31 +0000 (11:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:22:14 +0000 (16:22 +0200)
commitd9eaa90d7dbb2d85daddc6e466b9bf3ddb213667
tree1826655c6a8df93c9d45f1bcacb7fb519a40e09a
parent1c9b356bbe99570aaba30fac6da159b393a53ec6
ASoC: mediatek: mt8173: Fix snd_soc_component_initialize error path

commit a46d37012a5be1737393b8f82fd35665e4556eee upstream.

If the second component fails to initialize, cleanup the first on.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: stable@kernel.org
Fixes: f1b5bf07365d ("ASoC: mt2701/mt8173: replace platform to component")
Signed-off-by: Ricardo Ribalda Delgado <ribalda@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230612-mt8173-fixup-v2-1-432aa99ce24d@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c