[PATCH] erofs: remove unnecessary goto

Yangtao Li frank.li at vivo.com
Thu Jun 15 13:45:38 AEST 2023


It's redundant, let's remove it.

Signed-off-by: Yangtao Li <frank.li at vivo.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;
 }
 
-- 
2.39.0



More information about the Linux-erofs mailing list