From: Xiubo Li Date: Fri, 28 Feb 2014 02:48:19 +0000 (+0800) Subject: ASoC: cache: Do the codec->reg_cache zero pionter check X-Git-Tag: v3.15-rc1~36^2~1^2~5^2~14^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=931f27c6e892fdfe98896055e0df7962e21969d9;p=pandora-kernel.git ASoC: cache: Do the codec->reg_cache zero pionter check For the snd_soc_cache_init(), the reg_size maybe zero and then the value of codec->reg_cache, which is alloced via kzalloc, maybe equal to ZERO_SIZE_PTR. If the reg parameter of snd_soc_cache_write() is large enough, the cache[idx] = val maybe cause the kernel crash... So this patch fix this via doing the zero pionter check of it. Signed-off-by: Xiubo Li Signed-off-by: Mark Brown --- Reading git-diff-tree failed