From: John Rigby Date: Fri, 6 Apr 2007 22:57:37 +0000 (+1000) Subject: [POWERPC] Avoid putting cpu node twice X-Git-Tag: v2.6.22-rc1~1109^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ec367091a418dd6119e381758940a38b180089c;p=linux-2.6 [POWERPC] Avoid putting cpu node twice 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 Acked-by: Sylvain Munaut Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 4f5ebaadcb..8e2646ac41 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c @@ -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