summaryrefslogtreecommitdiffstats
path: root/arch/mips/generic
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2018-07-11 20:32:45 +0200
committerPaul Burton <paul.burton@mips.com>2018-07-28 04:48:57 +0200
commit28ec2238f37e72a3a40a7eb46893e7651bcc40a6 (patch)
treea615a6e2b8ee07be7e4e2a7d1e1b2d38f57a849b /arch/mips/generic
parentMIPS: Octeon: add missing of_node_put() (diff)
downloadlinux-28ec2238f37e72a3a40a7eb46893e7651bcc40a6.tar.xz
linux-28ec2238f37e72a3a40a7eb46893e7651bcc40a6.zip
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
Diffstat (limited to 'arch/mips/generic')
-rw-r--r--arch/mips/generic/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/generic/init.c b/arch/mips/generic/init.c
index 07ec08462d70..a106f8113842 100644
--- a/arch/mips/generic/init.c
+++ b/arch/mips/generic/init.c
@@ -203,6 +203,7 @@ void __init arch_init_irq(void)
"mti,cpu-interrupt-controller");
if (!cpu_has_veic && !intc_node)
mips_cpu_irq_init();
+ of_node_put(intc_node);
irqchip_init();
}