public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 20/24] ext4: return actual error on ext4_init_fs
@ 2014-06-17 14:32 Jeff Liu
  2014-06-17 15:13 ` Lukáš Czerner
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Liu @ 2014-06-17 14:32 UTC (permalink / raw)
  To: Theodore Ts'o, Andreas Dilger; +Cc: linux-ext4

From: Jie Liu <jeff.liu@oracle.com>

Return the actual error code if call kset_create_and_add() failed

Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
 fs/ext4/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b9b9aab..5912193 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5545,8 +5545,8 @@ static int __init ext4_init_fs(void)
 	if (err)
 		goto out6;
 	ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
-	if (!ext4_kset) {
-		err = -ENOMEM;
+	if (IS_ERR(ext4_kset)) {
+		err = PTR_ERR(ext4_kset);
 		goto out5;
 	}
 	ext4_proc_root = proc_mkdir("fs/ext4", NULL);
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-17 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 14:32 [PATCH 20/24] ext4: return actual error on ext4_init_fs Jeff Liu
2014-06-17 15:13 ` Lukáš Czerner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox