Merge tag 'pxa-fixes-5.0' of https://github.com/rjarzmik/linux into arm/fixes
[linux-2.6-microblaze.git] / drivers / net / phy / mdio_bus.c
index 2e59a84..66b9cfe 100644 (file)
@@ -390,6 +390,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
        if (IS_ERR(gpiod)) {
                dev_err(&bus->dev, "mii_bus %s couldn't get reset GPIO\n",
                        bus->id);
+               device_del(&bus->dev);
                return PTR_ERR(gpiod);
        } else  if (gpiod) {
                bus->reset_gpiod = gpiod;