Commit 5e264a52 authored by Nathan Lynch's avatar Nathan Lynch Committed by Paul Mackerras

[POWERPC] 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: default avatarNathan Lynch <ntl@pobox.com>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 6aa3e1e9
...@@ -254,7 +254,6 @@ static void __init maple_init_IRQ(void) ...@@ -254,7 +254,6 @@ static void __init maple_init_IRQ(void)
printk(KERN_DEBUG "OpenPIC addr: %lx, has ISUs: %d\n", printk(KERN_DEBUG "OpenPIC addr: %lx, has ISUs: %d\n",
openpic_addr, has_isus); openpic_addr, has_isus);
} }
of_node_put(root);
BUG_ON(openpic_addr == 0); BUG_ON(openpic_addr == 0);
......
...@@ -129,7 +129,6 @@ static __init void pas_init_IRQ(void) ...@@ -129,7 +129,6 @@ static __init void pas_init_IRQ(void)
} }
openpic_addr = of_read_number(opprop, naddr); openpic_addr = of_read_number(opprop, naddr);
printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
of_node_put(root);
mpic = mpic_alloc(mpic_node, openpic_addr, MPIC_PRIMARY, 0, 0, mpic = mpic_alloc(mpic_node, openpic_addr, MPIC_PRIMARY, 0, 0,
" PAS-OPIC "); " PAS-OPIC ");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment