diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 9e51e4fc00a05cc626b55bfe43bff21d981655e6..d28c4528eff8599491c3726e3dd5f7e7937b4801 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1012,8 +1012,10 @@ static int __init init_f2fs_fs(void) if (err) goto free_gc_caches; f2fs_kset = kset_create_and_add("f2fs", NULL, fs_kobj); - if (!f2fs_kset) + if (!f2fs_kset) { + err = -ENOMEM; goto free_checkpoint_caches; + } err = register_filesystem(&f2fs_fs_type); if (err) goto free_kset;