aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-10-29 06:59:31 -0400
committerTakashi Iwai <tiwai@suse.de>2013-10-29 06:59:31 -0400
commita40a3937222c728be925f2d78650cfe9b20be3f5 (patch)
tree40532dfebef2dc2ae7cb1d81949eee6d2da79601
parent9f694bc7936a7e4e9c9efac2900cddaf71303c0a (diff)
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>
-rw-r--r--sound/core/memalloc.c3
1 files changed, 3 insertions, 0 deletions
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)
172 struct device *dev = dmab->dev.dev; 172 struct device *dev = dmab->dev.dev;
173 struct gen_pool *pool = NULL; 173 struct gen_pool *pool = NULL;
174 174
175 dmab->area = NULL;
176 dmab->addr = 0;
177
175 if (dev->of_node) 178 if (dev->of_node)
176 pool = of_get_named_gen_pool(dev->of_node, "iram", 0); 179 pool = of_get_named_gen_pool(dev->of_node, "iram", 0);
177 180