summaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/slab.c b/mm/slab.c
index c9adfce00405..ad113c431e39 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);