aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/slab.c b/mm/slab.c
index c9adfce0040..ad113c431e3 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2907,8 +2907,7 @@ void *__kmalloc(size_t size, unsigned int __nocast flags)
* functions.
*/
cachep = __find_general_cachep(size, flags);
- if (unlikely(cachep == NULL))
- return NULL;
+ BUG_ON(!cachep); /* Allocation size too large for kmalloc */
return __cache_alloc(cachep, flags);
}
EXPORT_SYMBOL(__kmalloc);