Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd137e2b authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Check for NULL register bank in snd_soc_get_cache_val()

parent 6ac34062
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;