mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
ASoC: Check for NULL register bank in snd_soc_get_cache_val()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
This commit is contained in:
parent
6ac340623c
commit
fd137e2bba
@ -466,6 +466,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;
|
||||
|
Loading…
Reference in New Issue
Block a user