fix unbalanced uses of of_node_put
PATCH 1/1 fix unbalanced uses of of_node_put
The (maple|pasemi)_init_IRQ functions call of_node_put(root) once more than they should, causing the refcount of the root node to underflow, which triggers the WARN_ON in kref_get.
Signed-off-by Nathan Lynch <[email protected]>
arch/powerpc/platforms/maple/setup.c +0 -1
@@ -254,7 +254,6 @@ static void __init maple_init_IRQ(void)printk (KERN_DEBUG "OpenPIC addr: %lx, has ISUs: %d\n" , openpic_addr, has_isus); } -of_node_put (root);BUG_ON (openpic_addr ==0 );
arch/powerpc/platforms/pasemi/setup.c +0 -1
@@ -129,7 +129,6 @@ static __init void pas_init_IRQ(void) } openpic_addr =of_read_number (opprop, naddr);printk (KERN_DEBUG "OpenPIC addr: %lx\n" , openpic_addr); -of_node_put (root); mpic =mpic_alloc (mpic_node, openpic_addr,MPIC_PRIMARY ,0 ,0 ," PAS-OPIC " );
Quoted 5 lines · On Tue, 2 Jan 2007 16:37:06 -0600 Nathan Lynch <[email protected]> wrote:
The (maple|pasemi)_init_IRQ functions call
of_node_put(root)once more than they should, causing the refcount of the root node to underflow, which triggers theWARN_ONinkref_get.Signed-off-by Nathan Lynch <[email protected]>
Acked-by Olof Johansson <[email protected]>
Thanks for fixing this, Nathan.
Thanks,
Olof