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: <53A0510E.1010909@oracle.com>
Date:	Tue, 17 Jun 2014 22:30:38 +0800
From:	Jeff Liu <jeff.liu@...cle.com>
To:	gregkh@...uxfoundation.org
CC:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 15/24] drivers/of: return actual error on of_init

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

Return the actual error code if call kset_create_and_add() failed

Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Jie Liu <jeff.liu@...cle.com>
---
 drivers/of/base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 8368d96..8f8efa1 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -290,9 +290,9 @@ static int __init of_init(void)
 	/* Create the kset, and register existing nodes */
 	mutex_lock(&of_aliases_mutex);
 	of_kset = kset_create_and_add("devicetree", NULL, firmware_kobj);
-	if (!of_kset) {
+	if (IS_ERR(of_kset)) {
 		mutex_unlock(&of_aliases_mutex);
-		return -ENOMEM;
+		return PTR_ERR(of_kset);
 	}
 	for_each_of_allnodes(np)
 		__of_node_add(np);
-- 
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