From: Michael Walle Date: Wed, 10 Feb 2021 21:41:57 +0000 (+0100) Subject: net: gem: unregister mdio bus if probe fails X-Git-Url: http://git.dujemihanovic.xyz/html/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=038e02455bbc18d34946fdfe77faf2062adc3e2a;p=u-boot.git net: gem: unregister mdio bus if probe fails If probe fails, the mdio bus isn't unregistered. Fix it. Signed-off-by: Michael Walle Reviewed-by: Ramon Fried Signed-off-by: Michal Simek --- 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: