summaryrefslogtreecommitdiff
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2020-08-23 17:00:25 +0000
committerAndrey Zhizhikin <andrey.z@gmail.com>2020-08-24 10:19:07 +0000
commit952671071125edd74e401656820e52b3f87db446 (patch)
tree90c730441e7a6c328715fe35a9c5354b99d3d203 /drivers/base/dd.c
parentb66890eae17a10b50a94472de6ed095ff8ebd315 (diff)
parent77fcb48939fc863d9ba9d808fac9000959e937d3 (diff)
Merge tag 'v5.4.60' into 5.4-2.1.x-imx
This is the 5.4.60 stable release Conflicts (manual resolve): - drivers/crypto/caam/caamalg.c Keep NXP version, as it already covers the functionality for the upstream patch [d6bbd4eea2439] - drivers/gpu/drm/imx/imx-ldb.c Merge patch [1752ab50e8256] from upstream to disable both LVDS channels when Enoder is disabled Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'drivers/base/dd.c')
-rw-r--r--drivers/base/dd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 635f508f25c7..f8746aa3c14b 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -872,7 +872,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;