aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLi Yang <leoli@freescale.com>2007-01-17 01:42:22 -0500
committerPaul Mackerras <paulus@samba.org>2007-01-22 05:27:35 -0500
commit06cd9396778d5b70ba27fa8158db78d6bc0f007b (patch)
tree21914455cd9f38ec71e067cdabc2f56aa315ea04 /arch
parent121361f72ca93cb6710e368bb89f9d976b1da443 (diff)
[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: Li Yang <leoli@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c2
-rw-r--r--arch/powerpc/platforms/83xx/mpc8360e_pb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index f58c9780b66f..4d471190be8d 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -103,7 +103,7 @@ static void __init mpc832x_sys_setup_arch(void)
103#ifdef CONFIG_QUICC_ENGINE 103#ifdef CONFIG_QUICC_ENGINE
104 qe_reset(); 104 qe_reset();
105 105
106 if ((np = of_find_node_by_name(np, "par_io")) != NULL) { 106 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
107 par_io_init(np); 107 par_io_init(np);
108 of_node_put(np); 108 of_node_put(np);
109 109
diff --git a/arch/powerpc/platforms/83xx/mpc8360e_pb.c b/arch/powerpc/platforms/83xx/mpc8360e_pb.c
index 7bfd47ad7233..53b92a904e8e 100644
--- a/arch/powerpc/platforms/83xx/mpc8360e_pb.c
+++ b/arch/powerpc/platforms/83xx/mpc8360e_pb.c
@@ -108,7 +108,7 @@ static void __init mpc8360_sys_setup_arch(void)
108#ifdef CONFIG_QUICC_ENGINE 108#ifdef CONFIG_QUICC_ENGINE
109 qe_reset(); 109 qe_reset();
110 110
111 if ((np = of_find_node_by_name(np, "par_io")) != NULL) { 111 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
112 par_io_init(np); 112 par_io_init(np);
113 of_node_put(np); 113 of_node_put(np);
114 114