diff options
author | Yi Zhang <yizhang_hust@163.com> | 2016-03-08 23:15:22 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-01 14:22:17 -0700 |
commit | ded9db380d34344ee5263002570b9b8b705f7830 (patch) | |
tree | f412164e387e064d8d48f4603e9c0173c557723a /drivers/base | |
parent | e4234a1fc343ca35f852bc527fae56fade879d4a (diff) | |
download | linux-ded9db380d34344ee5263002570b9b8b705f7830.tar.gz linux-ded9db380d34344ee5263002570b9b8b705f7830.tar.xz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 16688f50729c..dae6cefa6060 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); |