irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup()
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 4 Jul 2017 09:10:40 +0000 (11:10 +0200)
committerpopcornmix <popcornmix@gmail.com>
Fri, 25 Aug 2017 16:35:09 +0000 (17:35 +0100)
commitef3078ac1621817a8bc219f3794ec34adf381167
tree3eaf318c108a8b844d2045886e76865ea8f643bf
parente0cea6eca8d48b5c67cd1d4b1274caf58f047c42
irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup()

commit 277867ade8262583f4280cadbe90e0031a3706a7 upstream.

of_find_compatible_node() is calling of_node_put() on its first argument
thus leading to an unbalanced of_node_get/put() issue if the node has not
been retained before that.

Instead of passing the root node, pass NULL, which does exactly the same:
iterate over all DT nodes, starting from the root node.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Fixes: 3d61467f9bab ("irqchip: atmel-aic: Implement RTC irq fixup")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/irqchip/irq-atmel-aic-common.c