diff --git a/include/linux/slab.h b/include/linux/slab.h index 6a396e493069..2736cdec1e3c 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -717,7 +717,7 @@ static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) * @size: how many bytes of memory are required. * @flags: the type of memory to allocate (see kmalloc). */ -static inline void *kzalloc(size_t size, gfp_t flags) +static inline __alloc_size(1) void *kzalloc(size_t size, gfp_t flags) { return kmalloc(size, flags | __GFP_ZERO); }