diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index a3ba95e96695..90dbf1b2a33a 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -948,6 +948,7 @@ error: error_module_put: module_put(d->driver->owner); + d->driver = NULL; error_put_device: put_device(d); if (ndev_owner != bus->owner)