projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ALSA: pcm: Warn if doubly preallocated
[linux-2.6-block.git]
/
sound
/
core
/
pcm_memory.c
diff --git
a/sound/core/pcm_memory.c
b/sound/core/pcm_memory.c
index 7600dcdf5fd4d14da1f3c0698f924c5dcdd6da0d..19407f79b63808a6402976e94e158df7d14c062c 100644
(file)
--- a/
sound/core/pcm_memory.c
+++ b/
sound/core/pcm_memory.c
@@
-221,6
+221,8
@@
void snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream,
int type, struct device *data,
size_t size, size_t max)
{
+ if (snd_BUG_ON(substream->dma_buffer.dev.type))
+ return;
substream->dma_buffer.dev.type = type;
substream->dma_buffer.dev.dev = data;
snd_pcm_lib_preallocate_pages1(substream, size, max);