]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ieee1394: small cleanup after "nopage"
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 15 Dec 2007 13:04:42 +0000 (14:04 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 30 Jan 2008 21:22:20 +0000 (22:22 +0100)
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/ieee1394/dma.c

index ec024b5d5e5e2afaa49c1a7da31a36785f16d52c..73685e7dc7e4c9e6acea24c454e737686768b7e3 100644 (file)
@@ -231,28 +231,20 @@ void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset,
 
 #ifdef CONFIG_MMU
 
-/* fault() handler for mmap access */
-
 static int dma_region_pagefault(struct vm_area_struct *vma,
-                                       struct vm_fault *vmf)
+                               struct vm_fault *vmf)
 {
-       unsigned long kernel_virt_addr;
-
        struct dma_region *dma = (struct dma_region *)vma->vm_private_data;
 
        if (!dma->kvirt)
-               goto error;
+               return VM_FAULT_SIGBUS;
 
        if (vmf->pgoff >= dma->n_pages)
-               goto error;
+               return VM_FAULT_SIGBUS;
 
-       kernel_virt_addr = (unsigned long)dma->kvirt + (vmf->pgoff << PAGE_SHIFT);
-       vmf->page = vmalloc_to_page((void *)kernel_virt_addr);
+       vmf->page = vmalloc_to_page(dma->kvirt + (vmf->pgoff << PAGE_SHIFT));
        get_page(vmf->page);
        return 0;
-
-      error:
-       return VM_FAULT_SIGBUS;
 }
 
 static struct vm_operations_struct dma_region_vm_ops = {