[PATCH] erofs: remove unnecessary goto

Jingbo Xu jefflexu at linux.alibaba.com
Thu Jun 15 14:20:37 AEST 2023



On 6/15/23 11:45 AM, Yangtao Li wrote:
> It's redundant, let's remove it.
> 
> Signed-off-by: Yangtao Li <frank.li at vivo.com>

Reviewed-by: Jingbo Xu <jefflexu at linux.alibaba.com>


> ---
>  fs/erofs/super.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 811ab66d805e..f48ce692094d 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -1016,10 +1016,8 @@ static int __init erofs_module_init(void)
>  					       sizeof(struct erofs_inode), 0,
>  					       SLAB_RECLAIM_ACCOUNT,
>  					       erofs_inode_init_once);
> -	if (!erofs_inode_cachep) {
> -		err = -ENOMEM;
> -		goto icache_err;
> -	}
> +	if (!erofs_inode_cachep)
> +		return -ENOMEM;
>  
>  	err = erofs_init_shrinker();
>  	if (err)
> @@ -1054,7 +1052,6 @@ static int __init erofs_module_init(void)
>  	erofs_exit_shrinker();
>  shrinker_err:
>  	kmem_cache_destroy(erofs_inode_cachep);
> -icache_err:
>  	return err;
>  }
>  

-- 
Thanks,
Jingbo


More information about the Linux-erofs mailing list