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: <53A05027.5020407@oracle.com>
Date:	Tue, 17 Jun 2014 22:26:47 +0800
From:	Jeff Liu <jeff.liu@...cle.com>
To:	gregkh@...uxfoundation.org
CC:	Christoph Lameter <cl@...two.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 02/24] sample/kobject: update kset-example code

From: Jie Liu <jeff.liu@...cle.com>
Subject: sample/kobject: update kset-example code

Check and return the error ptr if call kset_create_and_add() failed

Cc: Christoph Lameter <cl@...ux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Jie Liu <jeff.liu@...cle.com>
---
 samples/kobject/kset-example.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c
index ab5e447..c2911d9 100644
--- a/samples/kobject/kset-example.c
+++ b/samples/kobject/kset-example.c
@@ -238,8 +238,8 @@ static int __init example_init(void)
 	 * located under /sys/kernel/
 	 */
 	example_kset = kset_create_and_add("kset_example", NULL, kernel_kobj);
-	if (!example_kset)
-		return -ENOMEM;
+	if (IS_ERR(example_kset))
+		return PTR_ERR(example_kset);
 
 	/*
 	 * Create three objects and register them with our kset
-- 
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