ASoC: soc-core: Fix probe deferral following prelink failure
Commit78a24e10cd
("ASoC: soc-core: clear platform pointers on error") re-worked the clean-up of any platform pointers that may have been initialised by the function snd_soc_init_platform(). This commit missed one error path where if any of the prelinks for a soundcard failed to initialise, then these platform pointers would not be cleaned-up. This then prevents the soundcard from being initialised following a probe deferral when any of the soundcard prelinks cannot be found. Fix this by ensuring that soc_cleanup_platform() is called when initialising the soundcard prelinks fails. Fixes:78a24e10cd
("ASoC: soc-core: clear platform pointers on error") Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
bbf62563d8
commit
c342febcde
|
@ -2797,6 +2797,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
|
|||
|
||||
ret = soc_init_dai_link(card, link);
|
||||
if (ret) {
|
||||
soc_cleanup_platform(card);
|
||||
dev_err(card->dev, "ASoC: failed to init link %s\n",
|
||||
link->name);
|
||||
mutex_unlock(&client_mutex);
|
||||
|
|
Loading…
Reference in New Issue