提交 ded9db38 编写于 作者: Y Yi Zhang 提交者: Greg Kroah-Hartman

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: NYi Zhang <yizhang_hust@163.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e4234a1f
...@@ -402,7 +402,8 @@ static int really_probe(struct device *dev, struct device_driver *drv) ...@@ -402,7 +402,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
devres_release_all(dev); devres_release_all(dev);
driver_sysfs_remove(dev); driver_sysfs_remove(dev);
dev->driver = NULL; 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) if (dev->pm_domain && dev->pm_domain->dismiss)
dev->pm_domain->dismiss(dev); dev->pm_domain->dismiss(dev);
pm_runtime_reinit(dev); pm_runtime_reinit(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册