}
 }
 
-static void soc_cleanup_card_resources(struct snd_soc_card *card,
-                                      int card_probed)
+static void soc_cleanup_card_resources(struct snd_soc_card *card)
 {
        struct snd_soc_pcm_runtime *rtd, *n;
 
        soc_cleanup_card_debugfs(card);
 
        /* remove the card */
-       if (card_probed && card->remove)
+       if (card->probed && card->remove)
                card->remove(card);
+       card->probed = 0;
 
        if (card->snd_card) {
                snd_card_free(card->snd_card);
 static void snd_soc_unbind_card(struct snd_soc_card *card, bool unregister)
 {
        if (card->instantiated) {
-               int card_probed = 1;
-
                card->instantiated = false;
                snd_soc_flush_all_delayed_work(card);
 
-               soc_cleanup_card_resources(card, card_probed);
+               soc_cleanup_card_resources(card);
                if (!unregister)
                        list_add(&card->list, &unbind_card_list);
        } else {
        struct snd_soc_pcm_runtime *rtd;
        struct snd_soc_component *component;
        struct snd_soc_dai_link *dai_link;
-       int ret, i, card_probed = 0;
+       int ret, i;
 
        mutex_lock(&client_mutex);
        mutex_lock_nested(&card->mutex, SND_SOC_CARD_CLASS_INIT);
                ret = card->probe(card);
                if (ret < 0)
                        goto probe_end;
-               card_probed = 1;
+               card->probed = 1;
        }
 
        /* probe all components used by DAI links on this card */
                        goto probe_end;
                }
        }
-       card_probed = 1;
+       card->probed = 1;
 
        snd_soc_dapm_new_widgets(card);
 
 
 probe_end:
        if (ret < 0)
-               soc_cleanup_card_resources(card, card_probed);
+               soc_cleanup_card_resources(card);
 
        mutex_unlock(&card->mutex);
        mutex_unlock(&client_mutex);