summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorYi Zhang <yizhang_hust@163.com>2016-03-08 23:15:22 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-01 14:22:17 -0700
commitded9db380d34344ee5263002570b9b8b705f7830 (patch)
treef412164e387e064d8d48f4603e9c0173c557723a /drivers/base
parente4234a1fc343ca35f852bc527fae56fade879d4a (diff)
downloadop-kernel-dev-ded9db380d34344ee5263002570b9b8b705f7830.zip
op-kernel-dev-ded9db380d34344ee5263002570b9b8b705f7830.tar.gz
base: dd: don't remove driver_data in -EPROBE_DEFER case
the driver_data may be used for sanity check, it fails the probe() if driver_data is NULL after it is re-triggered. for example, soc_probe() in sound/soc/soc-core.c Signed-off-by: Yi Zhang <yizhang_hust@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/dd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 16688f5..dae6cef 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -402,7 +402,8 @@ pinctrl_bind_failed:
devres_release_all(dev);
driver_sysfs_remove(dev);
dev->driver = NULL;
- dev_set_drvdata(dev, NULL);
+ if (ret != -EPROBE_DEFER)
+ dev_set_drvdata(dev, NULL);
if (dev->pm_domain && dev->pm_domain->dismiss)
dev->pm_domain->dismiss(dev);
pm_runtime_reinit(dev);
OpenPOWER on IntegriCloud