Merge tag '5.20-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6
[linux-2.6-microblaze.git] / drivers / char / mspec.c
index 0fae333..f8231e2 100644 (file)
@@ -195,10 +195,7 @@ mspec_mmap(struct file *file, struct vm_area_struct *vma,
 
        pages = vma_pages(vma);
        vdata_size = sizeof(struct vma_data) + pages * sizeof(long);
-       if (vdata_size <= PAGE_SIZE)
-               vdata = kzalloc(vdata_size, GFP_KERNEL);
-       else
-               vdata = vzalloc(vdata_size);
+       vdata = kvzalloc(vdata_size, GFP_KERNEL);
        if (!vdata)
                return -ENOMEM;