]> Git Repo - J-u-boot.git/commitdiff
net: gem: unregister mdio bus if probe fails
authorMichael Walle <[email protected]>
Wed, 10 Feb 2021 21:41:57 +0000 (22:41 +0100)
committerMichal Simek <[email protected]>
Thu, 11 Feb 2021 18:06:44 +0000 (19:06 +0100)
If probe fails, the mdio bus isn't unregistered. Fix it.

Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
drivers/net/zynq_gem.c

index 5cb02bb3a7d25160c7ba9b5edc8e760df32f2691..585c06d6bd87f11cf28d5572b2676a05a763eda3 100644 (file)
@@ -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:
This page took 0.036273 seconds and 4 git commands to generate.