Skip to contentSkip to conversation

drivers/parisc: return actual error on pdc_stable_init

PATCH Applied Jeff Liu 1 participant 2 messages Jun 17, 2014 – Jun 18, 2014 PA-RISC architecture

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 12/24 drivers/parisc: return actual error on pdc_stable_init

From: Jie Liu <[email protected]>

Return the actual error code than ENOMEM if call kset_create_and_add() failed at pdc_stable_init().

Cc James E.J. Bottomley <[email protected]>
Cc Helge Deller <[email protected]>
---
 drivers/parisc/pdc_stable.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/parisc/pdc_stable.c +2 -2
index 0f54ab6..3daca50 100644
@@ -1065,8 +1065,8 @@ pdc_stable_init(void)
 
 	/* register the paths kset as a child of the stable kset */
 	paths_kset = kset_create_and_add("paths", NULL, stable_kobj);
-	if (!paths_kset) {
-		rc = -ENOMEM;
+	if (IS_ERR(paths_kset)) {
+		rc = PTR_ERR(paths_kset);
 		goto fail_ksetreg;
 	}
 
Signature · 1 line
1.8.3.2