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@linux.intel.com>
Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
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);