ASoC: Check for NULL register bank in snd_soc_get_cache_val()
PATCH 1/1 ASoC: Check for NULL register bank in snd_soc_get_cache_val()
Signed-off-by Mark Brown <[email protected]>
--- sound/soc/soc-cache.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/soc-cache.c +3 -0
@@ -463,6 +463,9 @@ static bool snd_soc_set_cache_val(void *base, unsigned int idx,static unsigned int snd_soc_get_cache_val (const void *base,unsigned int idx,unsigned int word_size) { +if (!base) +return -1 ; +switch (word_size) {case 1 : {const u8 *cache = base;
Signature · 1 line
1.7.5.3
Quoted 10 lines · Mark Brown
Signed-off-by Mark Brown <[email protected]>--- sound/soc/soc-cache.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)sound/soc/soc-cache.c +0
-0
sound/soc/soc-cache.c static bool snd_soc_set_cache_val(void *base, unsigned int idx, · line 471
Quoted 9 lines
sound/soc/soc-cache.c +3
-0@@ -463,6 +463,9 @@ static bool snd_soc_set_cache_val(void *base, unsigned int idx,static unsigned int snd_soc_get_cache_val (const void *base,unsigned int idx,unsigned int word_size) { +if (!base) +return -1 ; +switch (word_size) {case 1 : {const u8 *cache = base;
Acked-by Liam Girdwood <[email protected]>