diff options
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r-- | include/linux/slab.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 9aa90a6f20e0..41103910f8a2 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -180,7 +180,7 @@ size_t ksize(const void *); | |||
180 | */ | 180 | */ |
181 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | 181 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) |
182 | { | 182 | { |
183 | if (n != 0 && size > ULONG_MAX / n) | 183 | if (size != 0 && n > ULONG_MAX / size) |
184 | return NULL; | 184 | return NULL; |
185 | return __kmalloc(n * size, flags | __GFP_ZERO); | 185 | return __kmalloc(n * size, flags | __GFP_ZERO); |
186 | } | 186 | } |