lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <53A0512D.1090909@oracle.com>
Date:	Tue, 17 Jun 2014 22:31:09 +0800
From:	Jeff Liu <jeff.liu@...cle.com>
To:	benh@...nel.crashing.org, paulus@...ba.org
CC:	linuxppc-dev@...ts.ozlabs.org, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 04/24] powerpc: check/return actual error on sysfs functions

From: Jie Liu <jeff.liu@...cle.com>

Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Paul Mackerras <paulus@...ba.org>
Signed-off-by: Jie Liu <jeff.liu@...cle.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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ