From a40a3937222c728be925f2d78650cfe9b20be3f5 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 29 Oct 2013 11:59:31 +0100 Subject: 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 --- sound/core/memalloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index 278248b8f22a..9d93f02c6285 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -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); -- cgit v1.2.3