mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 15:37:23 +00:00
net: gem: unregister mdio bus if probe fails
If probe fails, the mdio bus isn't unregistered. Fix it. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
98757d87ee
commit
038e02455b
1 changed files with 3 additions and 1 deletions
|
@ -711,10 +711,12 @@ static int zynq_gem_probe(struct udevice *dev)
|
|||
|
||||
ret = zynq_phy_init(dev);
|
||||
if (ret)
|
||||
goto err2;
|
||||
goto err3;
|
||||
|
||||
return ret;
|
||||
|
||||
err3:
|
||||
mdio_unregister(priv->bus);
|
||||
err2:
|
||||
free(priv->rxbuffers);
|
||||
err1:
|
||||
|
|
Loading…
Reference in a new issue