Re: [PATCH v4 02/13] exfat: add super block operations

From: Markus Elfring
Date: Thu Nov 21 2019 - 04:42:24 EST


â
> +++ b/fs/exfat/super.c
â
> +static int __init init_exfat_fs(void)
> +{
â
> + err = -ENOMEM;
> + exfat_inode_cachep = kmem_cache_create("exfat_inode_cache",
> + sizeof(struct exfat_inode_info),
> + 0, SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD,
> + exfat_inode_init_once);
> + if (!exfat_inode_cachep)
> + goto shutdown_cache;

Should such an error code assignment be performed only after a failed function call?

Regards,
Markus