MIPS: generic: fix missing of_node_put()

of_find_compatible_node() returns a device_node pointer with refcount
incremented and must be decremented explicitly.
 As this code is using the result only to check presence of the interrupt
controller (!NULL) but not actually using the result otherwise the
refcount can be decremented here immediately again.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/19820/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
This commit is contained in:
Nicholas Mc Guire 2018-07-11 20:32:45 +02:00 committed by Paul Burton
parent b1259519e6
commit 28ec2238f3
No known key found for this signature in database
GPG Key ID: 3EA79FACB57500DD
1 changed files with 1 additions and 0 deletions

View File

@ -203,6 +203,7 @@ void __init arch_init_irq(void)
"mti,cpu-interrupt-controller"); "mti,cpu-interrupt-controller");
if (!cpu_has_veic && !intc_node) if (!cpu_has_veic && !intc_node)
mips_cpu_irq_init(); mips_cpu_irq_init();
of_node_put(intc_node);
irqchip_init(); irqchip_init();
} }