Skip to contentSkip to conversation

fs/dlm: return actual error on dlm_lockspace_init

PATCH Applied Jeff Liu 1 participant 1 message Jun 17, 2014 Distributed lock manager (DLM)

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 19/24 fs/dlm: return actual error on dlm_lockspace_init

From: Jie Liu <[email protected]>

Return the actual error code if call kset_create_and_add() failed

Cc Christine Caulfield <[email protected]>
Cc David Teigland <[email protected]>
---
 fs/dlm/lockspace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/dlm/lockspace.c +2 -2
index f3e7278..b0909c6 100644
@@ -245,9 +245,9 @@ int __init dlm_lockspace_init(void)
 	spin_lock_init(&lslist_lock);
 
 	dlm_kset = kset_create_and_add("dlm", &dlm_uevent_ops, kernel_kobj);
-	if (!dlm_kset) {
+	if (IS_ERR(dlm_kset)) {
 		printk(KERN_WARNING "%s: can not create kset\n", __func__);
-		return -ENOMEM;
+		return PTR_ERR(dlm_kset);
 	}
 	return 0;
 }
Signature · 1 line
1.8.3.2