Skip to contentSkip to conversation

ASoC: soc-core: Simplify compress_type overriding functionality

PATCH In review Dimitris Papastamos 2 participants 2 messages Jan 11, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: soc-core: Simplify compress_type overriding functionality

---
 sound/soc/soc-core.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
sound/soc/soc-core.c +1 -8
index 2ff708a..13c4092 100644
@@ -1761,15 +1761,8 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
 		if (i == card->num_configs) {
 			/* no need to override the compress_type so
 			 * go ahead and do the standard thing */
-			ret = snd_soc_init_codec_cache(codec, 0);
-			if (ret < 0) {
-				mutex_unlock(&card->mutex);
-				return;
-			}
-			continue;
+			compress_type = 0;
 		}
-		/* override the compress_type with the one supplied in
-		 * the machine driver */
 		ret = snd_soc_init_codec_cache(codec, compress_type);
 		if (ret < 0) {
 			mutex_unlock(&card->mutex);
Signature · 1 line
1.7.3.5
#1 lore raw

sound/soc/soc-core.c static void snd_soc_instantiate_card(struct snd_soc_card *card) · line 1765

Quoted 11 lines · Dimitris Papastamos
sound/soc/soc-core.c +1 -6
 		if (i == card->num_configs) {
 			/* no need to override the compress_type so
 			 * go ahead and do the standard thing */
-			ret = snd_soc_init_codec_cache(codec, 0);
-			if (ret < 0) {
-				mutex_unlock(&card->mutex);
-				return;
-			}
-			continue;
+			compress_type = 0;
 		}

Even simpler would be to init compress_type to zero and remove the check.