drivers/of: return actual error on of_init
PATCH 15/24 drivers/of: return actual error on of_init
From: Jie Liu <[email protected]>
Return the actual error code if call kset_create_and_add() failed
Cc Greg Kroah-Hartman <[email protected]>
Signed-off-by Jie Liu <[email protected]>
--- drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/of/base.c +2 -2
@@ -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);
Signature · 1 line
1.8.3.2
Quoted 9 lines · Jeff Liu
From: Jie Liu <[email protected]>
Return the actual error code if call
kset_create_and_add()failedCc Greg Kroah-Hartman <[email protected]>Signed-off-by Jie Liu <[email protected]>--- drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Nope, not taking this, sorry.