From: Liang He Date: Wed, 22 Mar 2023 06:20:57 +0000 (+0800) Subject: net: mdio: thunder: Add missing fwnode_handle_put() X-Git-Tag: baikal/mips/sdk5.8.2~82 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=97e2db27999116c5bc03029c81f2d993bd67c256;p=kernel.git 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: c84aaba0189c ("phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.") Signed-off-by: Liang He Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/drivers/net/phy/mdio-thunder.c b/drivers/net/phy/mdio-thunder.c index 1e2f57ed1ef75..31ca0361a11e0 100644 --- a/drivers/net/phy/mdio-thunder.c +++ b/drivers/net/phy/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: