projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mod_sysfs_setup() doesn't return errno when kobject_add_dir() failure occurs
[cascardo/linux.git]
/
mm
/
vmalloc.c
diff --git
a/mm/vmalloc.c
b/mm/vmalloc.c
index
7dc6aa7
..
9eef486
100644
(file)
--- a/
mm/vmalloc.c
+++ b/
mm/vmalloc.c
@@
-181,14
+181,13
@@
static struct vm_struct *__get_vm_area_node(unsigned long size, unsigned long fl
}
addr = ALIGN(start, align);
size = PAGE_ALIGN(size);
}
addr = ALIGN(start, align);
size = PAGE_ALIGN(size);
+ if (unlikely(!size))
+ return NULL;
area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node);
if (unlikely(!area))
return NULL;
area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node);
if (unlikely(!area))
return NULL;
- if (unlikely(!size))
- return NULL;
-
/*
* We always allocate a guard page.
*/
/*
* We always allocate a guard page.
*/
@@
-700,7
+699,7
@@
finished:
* that it is big enough to cover the vma. Will return failure if
* that criteria isn't met.
*
* that it is big enough to cover the vma. Will return failure if
* that criteria isn't met.
*
- * Similar to remap_pfn_range (see mm/memory.c)
+ * Similar to remap_pfn_range
()
(see mm/memory.c)
*/
int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
unsigned long pgoff)
*/
int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
unsigned long pgoff)