Revert "net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()"

This reverts commit be9d7e8db2.
This commit is contained in:
Ksawlii 2024-11-24 00:23:55 +01:00
parent 5c2a1132c9
commit 97133e2e2e

View file

@ -558,10 +558,8 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
of_remove_property(child, prop);
phydev = of_phy_find_device(child);
if (phydev) {
if (phydev)
phy_device_remove(phydev);
phy_device_free(phydev);
}
}
err = mdiobus_register(priv->slave_mii_bus);