[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230907095521.14053-3-Julia.Lawall@inria.fr>
Date: Thu, 7 Sep 2023 11:55:12 +0200
From: Julia Lawall <Julia.Lawall@...ia.fr>
To: Justin Chen <justin.chen@...adcom.com>
Cc: kernel-janitors@...r.kernel.org,
Florian Fainelli <florian.fainelli@...adcom.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
bcm-kernel-feedback-list@...adcom.com,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 02/11] net: bcmasp: add missing of_node_put
for_each_available_child_of_node performs an of_node_get
on each iteration, so a break out of the loop requires an
of_node_put.
This was done using the Coccinelle semantic patch
iterators/for_each_child.cocci
Signed-off-by: Julia Lawall <Julia.Lawall@...ia.fr>
---
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 +
1 file changed, 1 insertion(+)
diff -u -p a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
@@ -1300,6 +1300,7 @@ static int bcmasp_probe(struct platform_
if (!intf) {
dev_err(dev, "Cannot create eth interface %d\n", i);
bcmasp_remove_intfs(priv);
+ of_node_put(intf_node);
goto of_put_exit;
}
list_add_tail(&intf->list, &priv->intfs);
Powered by blists - more mailing lists