diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/dd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index fce8e35b6367..b29faa24eef8 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -864,7 +864,9 @@ static int __device_attach(struct device *dev, bool allow_async) int ret = 0; device_lock(dev); - if (dev->driver) { + if (dev->p->dead) { + goto out_unlock; + } else if (dev->driver) { if (device_is_bound(dev)) { ret = 1; goto out_unlock; |