[PATCH 04/24] powerpc: check/return actual error on sysfs functions
From: Jeff Liu
Date: Tue Jun 17 2014 - 10:31:56 EST
From: Jie Liu <jeff.liu@xxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
---
arch/powerpc/platforms/powernv/opal-dump.c | 2 +-
arch/powerpc/platforms/powernv/opal-elog.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c
index 788a197..e718baf 100644
--- a/arch/powerpc/platforms/powernv/opal-dump.c
+++ b/arch/powerpc/platforms/powernv/opal-dump.c
@@ -424,7 +424,7 @@ void __init opal_platform_dump_init(void)
int rc;
dump_kset = kset_create_and_add("dump", NULL, opal_kobj);
- if (!dump_kset) {
+ if (IS_ERR(dump_kset)) {
pr_warn("%s: Failed to create dump kset\n", __func__);
return;
}
diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index 10268c4..09c1f6f 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -296,9 +296,9 @@ int __init opal_elog_init(void)
int rc = 0;
elog_kset = kset_create_and_add("elog", NULL, opal_kobj);
- if (!elog_kset) {
+ if (IS_ERR(elog_kset)) {
pr_warn("%s: failed to create elog kset\n", __func__);
- return -1;
+ return PTR_ERR(elog_kset);
}
rc = opal_notifier_register(&elog_nb);
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/