Revert "net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()"
This reverts commit be9d7e8db2
.
This commit is contained in:
parent
5c2a1132c9
commit
97133e2e2e
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue