1
0
Fork 0

ALSA: memalloc: NULL-initialize in snd_malloc_dev_iram()

dmab->area and addr fields should be cleared at the head of
snd_malloc_dev_iram() as especially dmab->area is used to indicate the
allocation failure / fallback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
hifive-unleashed-5.1
Takashi Iwai 2013-10-29 11:59:31 +01:00
parent 9f694bc793
commit a40a393722
1 changed files with 3 additions and 0 deletions

View File

@ -172,6 +172,9 @@ static void snd_malloc_dev_iram(struct snd_dma_buffer *dmab, size_t size)
struct device *dev = dmab->dev.dev;
struct gen_pool *pool = NULL;
dmab->area = NULL;
dmab->addr = 0;
if (dev->of_node)
pool = of_get_named_gen_pool(dev->of_node, "iram", 0);