Skip to content

Commit

Permalink
[POWERPC] Avoid putting cpu node twice
Browse files Browse the repository at this point in the history
Call of_find_node_by_type with NULL instead of np
so the cpu node does not get put twice.
This was causing kref_put warnings.

Signed-off-by: John Rigby <jrigby@freescale.com>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
John Rigby authored and Paul Mackerras committed Apr 30, 2007
1 parent 057b184 commit 6ec3670
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/powerpc/platforms/52xx/lite5200.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ static void __init lite5200_setup_arch(void)
lite5200_setup_cpu(); /* Platorm specific */

#ifdef CONFIG_PCI
np = of_find_node_by_type(np, "pci");
if (np)
np = of_find_node_by_type(NULL, "pci");
if (np) {
mpc52xx_add_bridge(np);
of_node_put(np);
}
#endif

#ifdef CONFIG_BLK_DEV_INITRD
Expand Down

0 comments on commit 6ec3670

Please sign in to comment.