From 6e6b978c32bacd98a93e34af7f4222e76007705f Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Fri, 23 Aug 2013 08:30:20 +0800 Subject: f2fs: fix error return code in init_f2fs_fs() Fix to return -ENOMEM in the kset create and add error handling case instead of 0, as done elsewhere in this function. Introduced by commit b59d0bae6ca30c496f298881616258f9cde0d9c6. (f2fs: add sysfs support for controlling the gc_thread) Signed-off-by: Wei Yongjun Acked-by: Namjae Jeon [Jaegeuk Kim: merge the patch with previous modification] Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/f2fs') diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 9e51e4f..d28c452 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; -- cgit v1.1