summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/slab.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/slab.c b/mm/slab.c
index c9adfce..ad113c4 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);
OpenPOWER on IntegriCloud