]> www.infradead.org Git - users/jedix/linux-maple.git/commit
MIPS: generic: fix missing of_node_put()
authorNicholas Mc Guire <hofrat@osadl.org>
Wed, 11 Jul 2018 18:32:45 +0000 (20:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:43 +0000 (22:43 +0200)
commit946cf3fe1be660a0fd8520524f7385a2dab47ecc
tree61ef4066ccd22916bcd0eaa9a85c320d235c3613
parente607db7ce9845620173d70a8885390ee224c4787
MIPS: generic: fix missing of_node_put()

[ Upstream commit 28ec2238f37e72a3a40a7eb46893e7651bcc40a6 ]

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
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/generic/init.c