Message ID | 20201009070853.550096-1-nobuhiro1.iwamatsu@toshiba.co.jp |
---|---|
State | New |
Headers | show |
Series | [for,4.4,4.9,4.19,4.14,and,5.4] driver core: Fix probe_count imbalance in really_probe() | expand |
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 0047bbdd43c0f0..b3c569412f4e2e 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -472,7 +472,8 @@ static int really_probe(struct device *dev, struct device_driver *drv) drv->bus->name, __func__, drv->name, dev_name(dev)); if (!list_empty(&dev->devres_head)) { dev_crit(dev, "Resources present before probing\n"); - return -EBUSY; + ret = -EBUSY; + goto done; } re_probe: @@ -579,7 +580,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) ret = 0; done: atomic_dec(&probe_count); - wake_up(&probe_waitqueue); + wake_up_all(&probe_waitqueue); return ret; }