Commit 06cd9396 authored by Li Yang's avatar Li Yang Committed by Paul Mackerras

[POWERPC] Fix OF node refcnt underflow in 836x and 832x platform code

Incorrect use of of_find_node_by_name() causes of_node_put()
on a node which has already been put.  It causes the refcount of
the node to underflow, which triggers the WARN_ON in kref_get
for 836x and 832x.  This fixes it.
Signed-off-by: default avatarLi Yang <leoli@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 121361f7
...@@ -103,7 +103,7 @@ static void __init mpc832x_sys_setup_arch(void) ...@@ -103,7 +103,7 @@ static void __init mpc832x_sys_setup_arch(void)
#ifdef CONFIG_QUICC_ENGINE #ifdef CONFIG_QUICC_ENGINE
qe_reset(); qe_reset();
if ((np = of_find_node_by_name(np, "par_io")) != NULL) { if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
par_io_init(np); par_io_init(np);
of_node_put(np); of_node_put(np);
......
...@@ -108,7 +108,7 @@ static void __init mpc8360_sys_setup_arch(void) ...@@ -108,7 +108,7 @@ static void __init mpc8360_sys_setup_arch(void)
#ifdef CONFIG_QUICC_ENGINE #ifdef CONFIG_QUICC_ENGINE
qe_reset(); qe_reset();
if ((np = of_find_node_by_name(np, "par_io")) != NULL) { if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
par_io_init(np); par_io_init(np);
of_node_put(np); of_node_put(np);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment