mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
net: enetc: unregister mdiobus
If the device fails to probe - for example, when there is no
ethaddr set - then the private data is automatically freed
but the mdiobus remains registered.
Fixes: 1e354cb393
("drivers: net: fsl_enetc: register internal MDIO bus")
Signed-off-by: Michael Walle <michael@walle.cc>
This commit is contained in:
parent
339f652992
commit
7704b7fd67
1 changed files with 3 additions and 0 deletions
|
@ -361,6 +361,9 @@ static int enetc_remove(struct udevice *dev)
|
|||
{
|
||||
struct enetc_priv *priv = dev_get_priv(dev);
|
||||
|
||||
if (miiphy_get_dev_by_name(priv->imdio.name))
|
||||
mdio_unregister(&priv->imdio);
|
||||
|
||||
free(priv->enetc_txbd);
|
||||
free(priv->enetc_rxbd);
|
||||
|
||||
|
|
Loading…
Reference in a new issue