diff options
author | Michael Walle <michael@walle.cc> | 2021-02-11 00:41:57 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2021-02-11 21:06:44 +0300 |
commit | 038e02455bbc18d34946fdfe77faf2062adc3e2a (patch) | |
tree | 173b486c0aa73158270639aa4e3c4fef1836cbde /drivers/net/zynq_gem.c | |
parent | 98757d87ee04cd8f57e9f2d6a8017a1d1a4ea646 (diff) | |
download | u-boot-038e02455bbc18d34946fdfe77faf2062adc3e2a.tar.xz |
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>
Diffstat (limited to 'drivers/net/zynq_gem.c')
-rw-r--r-- | drivers/net/zynq_gem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 5cb02bb3a7..585c06d6bd 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -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: |