aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/soc-core.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6cc68140fa67..fb170a073763 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1748,6 +1748,8 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
1748 list_for_each_entry(codec, &codec_list, list) { 1748 list_for_each_entry(codec, &codec_list, list) {
1749 if (codec->cache_init) 1749 if (codec->cache_init)
1750 continue; 1750 continue;
1751 /* by default we don't override the compress_type */
1752 compress_type = 0;
1751 /* check to see if we need to override the compress_type */ 1753 /* check to see if we need to override the compress_type */
1752 for (i = 0; i < card->num_configs; ++i) { 1754 for (i = 0; i < card->num_configs; ++i) {
1753 codec_conf = &card->codec_conf[i]; 1755 codec_conf = &card->codec_conf[i];
@@ -1758,18 +1760,6 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
1758 break; 1760 break;
1759 } 1761 }
1760 } 1762 }
1761 if (i == card->num_configs) {
1762 /* no need to override the compress_type so
1763 * go ahead and do the standard thing */
1764 ret = snd_soc_init_codec_cache(codec, 0);
1765 if (ret < 0) {
1766 mutex_unlock(&card->mutex);
1767 return;
1768 }
1769 continue;
1770 }
1771 /* override the compress_type with the one supplied in
1772 * the machine driver */
1773 ret = snd_soc_init_codec_cache(codec, compress_type); 1763 ret = snd_soc_init_codec_cache(codec, compress_type);
1774 if (ret < 0) { 1764 if (ret < 0) {
1775 mutex_unlock(&card->mutex); 1765 mutex_unlock(&card->mutex);