aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/memory.c')
-rw-r--r--sound/pci/emu10k1/memory.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c
index 759e29f89478..7d379f5131fb 100644
--- a/sound/pci/emu10k1/memory.c
+++ b/sound/pci/emu10k1/memory.c
@@ -465,15 +465,12 @@ static int synth_alloc_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk
465 struct page *p = alloc_page(GFP_KERNEL | GFP_DMA32 | 465 struct page *p = alloc_page(GFP_KERNEL | GFP_DMA32 |
466 __GFP_NOWARN); 466 __GFP_NOWARN);
467 if (!p || (page_to_pfn(p) & ~(emu->dma_mask >> PAGE_SHIFT))) { 467 if (!p || (page_to_pfn(p) & ~(emu->dma_mask >> PAGE_SHIFT))) {
468 if (p)
469 __free_page(p);
468 /* try to allocate from <16MB zone */ 470 /* try to allocate from <16MB zone */
469 struct page *p1 = 471 p = alloc_page(GFP_ATOMIC | GFP_DMA |
470 alloc_page(GFP_ATOMIC | GFP_DMA |
471 __GFP_NORETRY | /* no OOM-killer */ 472 __GFP_NORETRY | /* no OOM-killer */
472 __GFP_NOWARN); 473 __GFP_NOWARN);
473 /* free page outside dma_mask range */
474 if (p)
475 free_page((unsigned long)page_address(p));
476 p = p1;
477 } 474 }
478 if (!p) { 475 if (!p) {
479 __synth_free_pages(emu, first_page, page - 1); 476 __synth_free_pages(emu, first_page, page - 1);