[PATCH] net: gem: unregister mdio bus if probe fails
Michael Walle
michael at walle.cc
Wed Feb 10 22:41:57 CET 2021
If probe fails, the mdio bus isn't unregistered. Fix it.
Signed-off-by: Michael Walle <michael at walle.cc>
---
drivers/net/zynq_gem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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:
--
2.20.1
More information about the U-Boot
mailing list