Commit a40a3937 authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 9f694bc7
...@@ -172,6 +172,9 @@ static void snd_malloc_dev_iram(struct snd_dma_buffer *dmab, size_t size) ...@@ -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 device *dev = dmab->dev.dev;
struct gen_pool *pool = NULL; struct gen_pool *pool = NULL;
dmab->area = NULL;
dmab->addr = 0;
if (dev->of_node) if (dev->of_node)
pool = of_get_named_gen_pool(dev->of_node, "iram", 0); pool = of_get_named_gen_pool(dev->of_node, "iram", 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment