Skip to content

Commit

Permalink
[POWERPC] Fix OF node refcnt underflow in 836x and 832x platform code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Yang authored and Paul Mackerras committed Jan 22, 2007
1 parent 121361f commit 06cd939
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/83xx/mpc832x_mds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/83xx/mpc8360e_pb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 06cd939

Please sign in to comment.