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

Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Cc: Paul Mackerras <pau...@samba.org>
Signed-off-by: Jie Liu <jeff....@oracle.com>
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to