mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 04:23:03 +02:00
Merge branch 'net-macb-fix-two-probe-path-leaks'
Nicolai Buchwitz says: ==================== net: macb: fix two probe path leaks Two independent leaks on macb probe paths, both noticed while reviewing the fixed-link unbind crash fix [1]. Patch 1 destroys the phylink instance when probe fails after macb_mii_init() has succeeded. Patch 2 drops the "mdio" child node reference on the success path of macb_mii_init(). [1] https://lore.kernel.org/netdev/20260902102836.2019355-1-vineeth.karumanchi@amd.com/ ==================== Link: https://patch.msgid.link/20260907210856.1673589-1-nb@tipi-net.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
a401a9d547
|
|
@ -1164,6 +1164,8 @@ static int macb_mii_init(struct macb *bp)
|
|||
if (err)
|
||||
goto err_out_unregister_bus;
|
||||
|
||||
of_node_put(mdio_np);
|
||||
|
||||
return 0;
|
||||
|
||||
err_out_unregister_bus:
|
||||
|
|
@ -5980,6 +5982,7 @@ static int macb_probe(struct platform_device *pdev)
|
|||
mdiobus_unregister(bp->mii_bus);
|
||||
mdiobus_free(bp->mii_bus);
|
||||
}
|
||||
phylink_destroy(bp->phylink);
|
||||
|
||||
err_out_phy_exit:
|
||||
phy_exit(bp->phy);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user