mirror of https://gitee.com/openkylin/linux.git
ASoC: stm32: sai: Add missing cleanup
The commit0d6defc7e0
("ASoC: stm32: sai: manage rebind issue") converts some function calls to their non-devm equivalents. The appropriate cleanup code was added to the remove function, but not to the probe function. Add a call to snd_dmaengine_pcm_unregister to compensate for the call to snd_dmaengine_pcm_register in case of subsequent failure. Fixes: commit0d6defc7e0
("ASoC: stm32: sai: manage rebind issue") Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Acked-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/1586099028-5104-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c515291d31
commit
7506baeed8
|
@ -1556,8 +1556,10 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
|
|||
|
||||
ret = snd_soc_register_component(&pdev->dev, &stm32_component,
|
||||
&sai->cpu_dai_drv, 1);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
snd_dmaengine_pcm_unregister(&pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
|
||||
conf = &stm32_sai_pcm_config_spdif;
|
||||
|
|
Loading…
Reference in New Issue