diff options
Diffstat (limited to 'fs/squashfs/cache.c')
| -rw-r--r-- | fs/squashfs/cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/squashfs/cache.c b/fs/squashfs/cache.c index 181260e72680..5d97b22ce297 100644 --- a/fs/squashfs/cache.c +++ b/fs/squashfs/cache.c @@ -229,13 +229,13 @@ struct squashfs_cache *squashfs_cache_init(char *name, int entries, if (entries == 0) return NULL; - cache = kzalloc(sizeof(*cache), GFP_KERNEL); + cache = kzalloc_obj(*cache, GFP_KERNEL); if (cache == NULL) { ERROR("Failed to allocate %s cache\n", name); return ERR_PTR(-ENOMEM); } - cache->entry = kcalloc(entries, sizeof(*(cache->entry)), GFP_KERNEL); + cache->entry = kzalloc_objs(*(cache->entry), entries, GFP_KERNEL); if (cache->entry == NULL) { ERROR("Failed to allocate %s cache\n", name); goto cleanup; |
