diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_native.c | 10 | ||||
-rw-r--r-- | sound/oss/via82cxxx_audio.c | 4 | ||||
-rw-r--r-- | sound/usb/usx2y/usX2Yhwdep.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 66e24b5da469..6ea67b16c676 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -3027,7 +3027,7 @@ static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, | |||
3027 | struct page * page; | 3027 | struct page * page; |
3028 | 3028 | ||
3029 | if (substream == NULL) | 3029 | if (substream == NULL) |
3030 | return NOPAGE_OOM; | 3030 | return NOPAGE_SIGBUS; |
3031 | runtime = substream->runtime; | 3031 | runtime = substream->runtime; |
3032 | page = virt_to_page(runtime->status); | 3032 | page = virt_to_page(runtime->status); |
3033 | get_page(page); | 3033 | get_page(page); |
@@ -3070,7 +3070,7 @@ static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, | |||
3070 | struct page * page; | 3070 | struct page * page; |
3071 | 3071 | ||
3072 | if (substream == NULL) | 3072 | if (substream == NULL) |
3073 | return NOPAGE_OOM; | 3073 | return NOPAGE_SIGBUS; |
3074 | runtime = substream->runtime; | 3074 | runtime = substream->runtime; |
3075 | page = virt_to_page(runtime->control); | 3075 | page = virt_to_page(runtime->control); |
3076 | get_page(page); | 3076 | get_page(page); |
@@ -3131,18 +3131,18 @@ static struct page *snd_pcm_mmap_data_nopage(struct vm_area_struct *area, | |||
3131 | size_t dma_bytes; | 3131 | size_t dma_bytes; |
3132 | 3132 | ||
3133 | if (substream == NULL) | 3133 | if (substream == NULL) |
3134 | return NOPAGE_OOM; | 3134 | return NOPAGE_SIGBUS; |
3135 | runtime = substream->runtime; | 3135 | runtime = substream->runtime; |
3136 | offset = area->vm_pgoff << PAGE_SHIFT; | 3136 | offset = area->vm_pgoff << PAGE_SHIFT; |
3137 | offset += address - area->vm_start; | 3137 | offset += address - area->vm_start; |
3138 | snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM); | 3138 | snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_SIGBUS); |
3139 | dma_bytes = PAGE_ALIGN(runtime->dma_bytes); | 3139 | dma_bytes = PAGE_ALIGN(runtime->dma_bytes); |
3140 | if (offset > dma_bytes - PAGE_SIZE) | 3140 | if (offset > dma_bytes - PAGE_SIZE) |
3141 | return NOPAGE_SIGBUS; | 3141 | return NOPAGE_SIGBUS; |
3142 | if (substream->ops->page) { | 3142 | if (substream->ops->page) { |
3143 | page = substream->ops->page(substream, offset); | 3143 | page = substream->ops->page(substream, offset); |
3144 | if (! page) | 3144 | if (! page) |
3145 | return NOPAGE_OOM; | 3145 | return NOPAGE_OOM; /* XXX: is this really due to OOM? */ |
3146 | } else { | 3146 | } else { |
3147 | vaddr = runtime->dma_area + offset; | 3147 | vaddr = runtime->dma_area + offset; |
3148 | page = virt_to_page(vaddr); | 3148 | page = virt_to_page(vaddr); |
diff --git a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c index 17837d4b5ed3..c96cc8c68b3b 100644 --- a/sound/oss/via82cxxx_audio.c +++ b/sound/oss/via82cxxx_audio.c | |||
@@ -2120,8 +2120,8 @@ static struct page * via_mm_nopage (struct vm_area_struct * vma, | |||
2120 | return NOPAGE_SIGBUS; /* Disallow mremap */ | 2120 | return NOPAGE_SIGBUS; /* Disallow mremap */ |
2121 | } | 2121 | } |
2122 | if (!card) { | 2122 | if (!card) { |
2123 | DPRINTK ("EXIT, returning NOPAGE_OOM\n"); | 2123 | DPRINTK ("EXIT, returning NOPAGE_SIGBUS\n"); |
2124 | return NOPAGE_OOM; /* Nothing allocated */ | 2124 | return NOPAGE_SIGBUS; /* Nothing allocated */ |
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | pgoff = vma->vm_pgoff + ((address - vma->vm_start) >> PAGE_SHIFT); | 2127 | pgoff = vma->vm_pgoff + ((address - vma->vm_start) >> PAGE_SHIFT); |
diff --git a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c index 4b52d18dcd53..b76b3dd9df25 100644 --- a/sound/usb/usx2y/usX2Yhwdep.c +++ b/sound/usb/usx2y/usX2Yhwdep.c | |||
@@ -48,7 +48,7 @@ static struct page * snd_us428ctls_vm_nopage(struct vm_area_struct *area, unsign | |||
48 | 48 | ||
49 | offset = area->vm_pgoff << PAGE_SHIFT; | 49 | offset = area->vm_pgoff << PAGE_SHIFT; |
50 | offset += address - area->vm_start; | 50 | offset += address - area->vm_start; |
51 | snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM); | 51 | snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_SIGBUS); |
52 | vaddr = (char*)((struct usX2Ydev *)area->vm_private_data)->us428ctls_sharedmem + offset; | 52 | vaddr = (char*)((struct usX2Ydev *)area->vm_private_data)->us428ctls_sharedmem + offset; |
53 | page = virt_to_page(vaddr); | 53 | page = virt_to_page(vaddr); |
54 | get_page(page); | 54 | get_page(page); |