diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 9a1d940342ac4a..5173b0766a2616 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -487,7 +487,6 @@ static int really_probe(struct device *dev, struct device_driver *drv) if (ret) return ret; - atomic_inc(&probe_count); pr_debug("bus: '%s': %s: probing driver %s with device %s\n", drv->bus->name, __func__, drv->name, dev_name(dev)); if (!list_empty(&dev->devres_head)) { @@ -495,6 +494,8 @@ static int really_probe(struct device *dev, struct device_driver *drv) return -EBUSY; } + atomic_inc(&probe_count); + re_probe: dev->driver = drv;