Skip to contentSkip to conversation

ASoC: cache: Fix error code when not using ASoC level cache

PATCH New Mark Brown 1 participant 1 message Jun 2, 2014

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 ASoC: cache: Fix error code when not using ASoC level cache

From: Mark Brown <[email protected]>

It is not an error to have no cache so we shouldn't return an error code and cause our callers to fail, just silently do nothing instead. Thanks to Jarkko for identify the problematic commit.

---
 sound/soc/soc-cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-cache.c +1 -1
index 8fff5b6..00e70b6 100644
@@ -73,7 +73,7 @@ int snd_soc_cache_init(struct snd_soc_codec *codec)
 	reg_size = codec_drv->reg_cache_size * codec_drv->reg_word_size;
 
 	if (!reg_size)
-		return -EINVAL;
+		return 0;
 
 	mutex_init(&codec->cache_rw_mutex);
 
Signature · 1 line
2.0.0.rc2