[PATCH] ASoC: remove a card from the list, if instantiation failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If instantiation of a card failed, we have to remove it from the card 
list. This fixes an Oops on Migo-R, triggering, when after a failed 
firmware load attempt the driver modules are removed and re-inserted 
again.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
---

Should also be good for stable.

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index c8b0556..307eea0 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2361,6 +2361,8 @@ static int snd_soc_register_card(struct snd_soc_card *card)
 	mutex_lock(&client_mutex);
 	list_add(&card->list, &card_list);
 	snd_soc_instantiate_cards();
+	if (!card->instantiated)
+		list_del(&card->list);
 	mutex_unlock(&client_mutex);
 
 	dev_dbg(card->dev, "Registered card '%s'\n", card->name);
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux