sample/kobject: update kset-example code
PATCH 2/24 sample/kobject: update kset-example code
From: Jie Liu <[email protected]>
Subject: sample/kobject: update kset-example code
Check and return the error ptr if call kset_create_and_add() failed
Cc Christoph Lameter <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Andrew Morton <[email protected]>
Signed-off-by Jie Liu <[email protected]>
--- samples/kobject/kset-example.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
samples/kobject/kset-example.c +2 -2
@@ -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
Signature · 1 line
1.8.3.2
Quoted 5 lines · Jeff Liu
From: Jie Liu <[email protected]>
Subject: sample/kobject: update kset-example codeCheck and return the error ptr if call
kset_create_and_add()failed
Quoted 7 lines
Cc Christoph Lameter <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Jie Liu <[email protected]>--- samples/kobject/kset-example.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Nope, not taking this, sorry.
greg k-h
Quoted 14 lines · Greg KH
Quoted 5 lines · Jeff Liu
From: Jie Liu <[email protected]>
Subject: sample/kobject: update kset-example codeCheck and return the error ptr if call
kset_create_and_add()failedQuoted 7 lines
Cc Christoph Lameter <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Jie Liu <[email protected]>--- samples/kobject/kset-example.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 1 line
Nope, not taking this, sorry.
Ok. I will then accept the first patch to slub.c that you sent which simply returns -ENOMEM. Please resend that one.