Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110922
b: refs/heads/master
c: 4e184f8
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Aug 25, 2008
1 parent 60e90b5 commit 358a230
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77a23f2695bb2de0cd74599400dc55109c531b72
refs/heads/master: 4e184f8fc06411f35fdcf4b9bc6187c857bf7214
7 changes: 6 additions & 1 deletion trunk/sound/core/memalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,16 @@ int snd_dma_alloc_pages_fallback(int type, struct device *device, size_t size,
int err;

while ((err = snd_dma_alloc_pages(type, device, size, dmab)) < 0) {
size_t aligned_size;
if (err != -ENOMEM)
return err;
size >>= 1;
if (size <= PAGE_SIZE)
return -ENOMEM;
aligned_size = PAGE_SIZE << get_order(size);
if (size != aligned_size)
size = aligned_size;
else
size >>= 1;
}
if (! dmab->area)
return -ENOMEM;
Expand Down

0 comments on commit 358a230

Please sign in to comment.