From 931f27c6e892fdfe98896055e0df7962e21969d9 Mon Sep 17 00:00:00 2001
From: Xiubo Li
Date: Fri, 28 Feb 2014 10:48:19 +0800
Subject: [PATCH] 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-format-patch failed