From ded9db380d34344ee5263002570b9b8b705f7830 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Tue, 8 Mar 2016 23:15:22 +0800 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/base/dd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.7.4