aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Brezillon2017-07-04 04:10:40 -0500
committerGreg Kroah-Hartman2017-08-24 19:02:36 -0500
commitb27e9ff9a5f457e85c47733387426bf522cef2aa (patch)
treea7ee453c41a565e3aea92fd9826201262e32a379
parented281a6acaf1260800841fc8182e6a8b1d1b1371 (diff)
downloadkernel-omap-b27e9ff9a5f457e85c47733387426bf522cef2aa.tar.gz
kernel-omap-b27e9ff9a5f457e85c47733387426bf522cef2aa.tar.xz
kernel-omap-b27e9ff9a5f457e85c47733387426bf522cef2aa.zip
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>
-rw-r--r--drivers/irqchip/irq-atmel-aic-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
index fe177224ee71..831a195cb806 100644
--- a/drivers/irqchip/irq-atmel-aic-common.c
+++ b/drivers/irqchip/irq-atmel-aic-common.c
@@ -148,9 +148,9 @@ void __init aic_common_rtc_irq_fixup(struct device_node *root)
148 struct device_node *np; 148 struct device_node *np;
149 void __iomem *regs; 149 void __iomem *regs;
150 150
151 np = of_find_compatible_node(root, NULL, "atmel,at91rm9200-rtc"); 151 np = of_find_compatible_node(NULL, NULL, "atmel,at91rm9200-rtc");
152 if (!np) 152 if (!np)
153 np = of_find_compatible_node(root, NULL, 153 np = of_find_compatible_node(NULL, NULL,
154 "atmel,at91sam9x5-rtc"); 154 "atmel,at91sam9x5-rtc");
155 155
156 if (!np) 156 if (!np)