projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f694bc
)
ALSA: memalloc: NULL-initialize in snd_malloc_dev_iram()
author
Takashi Iwai
<tiwai@suse.de>
Tue, 29 Oct 2013 10:59:31 +0000
(11:59 +0100)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 29 Oct 2013 10:59:31 +0000
(11:59 +0100)
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>
sound/core/memalloc.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/core/memalloc.c
b/sound/core/memalloc.c
index 278248b8f22a6332acf38a673b84ed290dcb30ce..9d93f02c6285d7648ea72d99ac5286ab6a45d19f 100644
(file)
--- 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);