Fix bug in 836x and 832x platform code
Subsystems (2)
PATCH 1/1 Fix bug in 836x and 832x platform code
The wrongly 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.
Signed-off-by Li Yang <[email protected]>
---
arch/powerpc/platforms/83xx/mpc832x_mds.c | 2 +- arch/powerpc/platforms/83xx/mpc8360e_pb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/83xx/mpc832x_mds.c +0 -0
@@ -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);arch/powerpc/platforms/83xx/mpc8360e_pb.c +0 -0
@@ -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);