Commit ded9db38 authored by Yi Zhang's avatar Yi Zhang Committed by 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: default avatarYi Zhang <yizhang_hust@163.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e4234a1f
......@@ -402,7 +402,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment