]> err.no Git - linux-2.6/commitdiff
[POWERPC] Fix OF node refcnt underflow in 836x and 832x platform code
authorLi Yang <leoli@freescale.com>
Wed, 17 Jan 2007 06:42:22 +0000 (14:42 +0800)
committerPaul Mackerras <paulus@samba.org>
Mon, 22 Jan 2007 10:27:35 +0000 (21:27 +1100)
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: Li Yang <leoli@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/83xx/mpc832x_mds.c
arch/powerpc/platforms/83xx/mpc8360e_pb.c

index f58c9780b66f705e3fe69aea463abdfe31b5c706..4d471190be8dc8ea877ca35fbc893b29b42fc635 100644 (file)
@@ -103,7 +103,7 @@ static void __init mpc832x_sys_setup_arch(void)
 #ifdef CONFIG_QUICC_ENGINE
        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);
                of_node_put(np);
 
index 7bfd47ad723317ed13aa83c5241b6203cfef3f9a..53b92a904e8e11a74ea1f76ad8b476008e23ebba 100644 (file)
@@ -108,7 +108,7 @@ static void __init mpc8360_sys_setup_arch(void)
 #ifdef CONFIG_QUICC_ENGINE
        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);
                of_node_put(np);