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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jie Liu <jeff.liu@xxxxxxxxxx>

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

Cc: James E.J. Bottomley <jejb@xxxxxxxxxxxxxxxx>
Cc: Helge Deller <deller@xxxxxx>
Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
---
 drivers/parisc/pdc_stable.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index 0f54ab6..3daca50 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -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;
 	}
 
-- 
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux