]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/nommu.c
[ARM] 3962/1: AT91: Support for Atmel AT91SAM9260-EK board
[linux-2.6-omap-h63xx.git] / mm / nommu.c
index 564540662192290b67f4a000c969407c404e86ad..8bdde9508f3b80fc8ed5738e3716f6d2d0872c3c 100644 (file)
@@ -221,7 +221,7 @@ long vwrite(char *buf, char *addr, unsigned long count)
  *     Allocate enough pages to cover @size from the page level
  *     allocator and map them into continguos kernel virtual space.
  *
- *     For tight cotrol over page level allocator and protection flags
+ *     For tight control over page level allocator and protection flags
  *     use __vmalloc() instead.
  */
 void *vmalloc(unsigned long size)
@@ -948,7 +948,8 @@ unsigned long do_mmap_pgoff(struct file *file,
        up_write(&nommu_vma_sem);
        kfree(vml);
        if (vma) {
-               fput(vma->vm_file);
+               if (vma->vm_file)
+                       fput(vma->vm_file);
                kfree(vma);
        }
        return ret;