From: Wei Yongjun <yongjun_...@trendmicro.com.cn> 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 <yongjun_...@trendmicro.com.cn> --- fs/f2fs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 66d1ec1..33a809f 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1013,8 +1013,10 @@ static int __init init_f2fs_fs(void) if (err) goto fail; f2fs_kset = kset_create_and_add("f2fs", NULL, fs_kobj); - if (!f2fs_kset) + if (!f2fs_kset) { + err = -ENOMEM; goto fail; + } err = register_filesystem(&f2fs_fs_type); if (err) goto fail; ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel