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: 379d7ac7ca
("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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
94ef1715d2
commit
7aa3d03e1b
@@ -104,6 +104,7 @@ static int thunder_mdiobus_pci_probe(struct pci_dev *pdev,
|
|||||||
if (i >= ARRAY_SIZE(nexus->buses))
|
if (i >= ARRAY_SIZE(nexus->buses))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
fwnode_handle_put(fwn);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_release_regions:
|
err_release_regions:
|
||||||
|
Reference in New Issue
Block a user