Skip to content

Commit

Permalink
net: mdio: thunder: Add missing fwnode_handle_put()
Browse files Browse the repository at this point in the history
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: 379d7ac ("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>
  • Loading branch information
Liang He authored and David S. Miller committed Mar 23, 2023
1 parent fb63d21 commit b1de5c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/mdio/mdio-thunder.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,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:
Expand Down

0 comments on commit b1de5c7

Please sign in to comment.