summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2023-03-22 09:20:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-30 13:49:11 +0300
commitd84fe6dc7377037561cfaa29b93f1d6ce4335168 (patch)
tree5b370d3989e17b1b7424a13816dfc37c6d21439b
parentd1775958c2ae7b966ccaed8af5668e0ee2baabce (diff)
downloadlinux-d84fe6dc7377037561cfaa29b93f1d6ce4335168.tar.xz
net: mdio: thunder: Add missing fwnode_handle_put()
[ Upstream commit b1de5c78ebe9858ccec9d49af2f76724f1d47e3e ] In device_for_each_child_node(), we should add fwnode_handle_put() when break out of the iteration device_for_each_child_node() as it will automatically increase and decrease the refcounter. Fixes: 379d7ac7ca31 ("phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.") Signed-off-by: Liang He <windhl@126.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/mdio/mdio-thunder.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/mdio/mdio-thunder.c b/drivers/net/mdio/mdio-thunder.c
index 822d2cdd2f35..394b864aaa37 100644
--- a/drivers/net/mdio/mdio-thunder.c
+++ b/drivers/net/mdio/mdio-thunder.c
@@ -104,6 +104,7 @@ static int thunder_mdiobus_pci_probe(struct pci_dev *pdev,
if (i >= ARRAY_SIZE(nexus->buses))
break;
}
+ fwnode_handle_put(fwn);
return 0;
err_release_regions: