From: Mark Brown Date: Mon, 2 Jun 2014 15:08:21 +0000 (+0100) Subject: ASoC: cache: Fix error code when not using ASoC level cache X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b5fc40d3b37bdb3524cdf1f550bd0c3b05ac3888;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ASoC: cache: Fix error code when not using ASoC level cache 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 Reported-by: Fabio Estevam Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 8fff5b6d86db..00e70b6c7da2 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);