2 Jun
2014
2 Jun
'14
4:13 p.m.
On Mon, Jun 2, 2014 at 11:10 AM, Lars-Peter Clausen lars@metafoo.de wrote:
I think snd_soc_cache_init() should return 0 rather than -EINVAL if reg_size is 0.
Yes, this fixes the issue:
--- 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);