mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-03 01:36:44 +07:00
ASoC: core: remove codec from list if registration failed
Current snd_soc_register_codec() adds codec to list, and calls snd_soc_register_dais(). But, this listed codec should be removed if dais registration was failed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
2db6be6a7b
commit
e1328a832c
@ -4096,6 +4096,10 @@ int snd_soc_register_codec(struct device *dev,
|
||||
return 0;
|
||||
|
||||
fail_codec_name:
|
||||
mutex_lock(&client_mutex);
|
||||
list_del(&codec->list);
|
||||
mutex_unlock(&client_mutex);
|
||||
|
||||
kfree(codec->name);
|
||||
fail_codec:
|
||||
kfree(codec);
|
||||
|
Loading…
Reference in New Issue
Block a user