irqchip/gic-v2m: Fix of_node refcount on error
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 16 Dec 2015 11:03:24 +0000 (11:03 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 16 Dec 2015 15:30:51 +0000 (15:30 +0000)
On the error path, the v2m drivers drops the refcount on the parent
node instead of doing it on the node that generated the error.
Humph...

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/irqchip/irq-gic-v2m.c

index 87f8d104acab37970b834ded3b74a93ba8b692f6..ee1e553ee7a6e52e23ea8dda01f524e3116aad42 100644 (file)
@@ -389,7 +389,7 @@ int __init gicv2m_of_init(struct device_node *node, struct irq_domain *parent)
 
                ret = gicv2m_init_one(child, parent);
                if (ret) {
-                       of_node_put(node);
+                       of_node_put(child);
                        break;
                }
        }