diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2907,7 +2907,8 @@ void *__kmalloc(size_t size, unsigned int __nocast flags) | |||
2907 | * functions. | 2907 | * functions. |
2908 | */ | 2908 | */ |
2909 | cachep = __find_general_cachep(size, flags); | 2909 | cachep = __find_general_cachep(size, flags); |
2910 | BUG_ON(!cachep); /* Allocation size too large for kmalloc */ | 2910 | if (unlikely(cachep == NULL)) |
2911 | return NULL; | ||
2911 | return __cache_alloc(cachep, flags); | 2912 | return __cache_alloc(cachep, flags); |
2912 | } | 2913 | } |
2913 | EXPORT_SYMBOL(__kmalloc); | 2914 | EXPORT_SYMBOL(__kmalloc); |