[alsa-devel] [PATCH] ASoC: cache: Fix error code when not using ASoC level cache
Mark Brown
broonie at kernel.org
Mon Jun 2 17:11:03 CEST 2014
From: Mark Brown <broonie at linaro.org>
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.
Reported-by: Jarkko Nikula <jarkko.nikula at linux.intel.com>
Reported-by: Fabio Estevam <festevam at gmail.com>
Signed-off-by: Mark Brown <broonie at linaro.org>
---
sound/soc/soc-cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index 8fff5b6..00e70b6 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -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);
--
2.0.0.rc2
More information about the Alsa-devel
mailing list