Thread (4 messages) 4 messages, 3 authors, 28d ago

Re: [PATCH v1] irqchip/gic-v3-its: Drop ITS node reference on its_of_probe() errors

flat view

From: Yuho Choi <hidden>
Date: 2026-09-25 05:00:50
Also in: lkml

On Thu, 24 Sept 2026 at 16:12, Marc Zyngier [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index e9807af235373..91e08b5229b1c 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5561,7 +5561,6 @@ static void its_node_destroy(struct its_node *its)

 static int __init its_of_probe(struct device_node *node)
 {
-       struct device_node *np;
        struct resource res;
        int err;
@@ -5571,7 +5570,7 @@ static int __init its_of_probe(struct device_node *node)
         * reset, don't even try to go any further, as this could
         * result in something even worse.
         */
-       for (np = of_find_matching_node(node, its_device_id); np;
+       for (struct device_node *np __free(device_node) = of_find_matching_node(node, its_device_id); np;
             np = of_find_matching_node(np, its_device_id)) {
                if (!of_device_is_available(np) ||
                    !of_property_read_bool(np, "msi-controller") ||
@@ -5583,7 +5582,7 @@ static int __init its_of_probe(struct device_node *node)
                        return err;
        }

-       for (np = of_find_matching_node(node, its_device_id); np;
+       for (struct device_node *np __free(device_node) = of_find_matching_node(node, its_device_id); np;
             np = of_find_matching_node(np, its_device_id)) {
                struct its_node *its;
I appreciate your time reviewing this.
I'll send v2 based on your feedback.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help