All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] base: dd: don't remove driver_data in -EPROBE_DEFER case
@ 2016-03-08 15:15 Yi Zhang
       [not found] ` <1457450122-5792-1-git-send-email-yizhang_hust-9Onoh4P/yGk@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Yi Zhang @ 2016-03-08 15:15 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Yi Zhang

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>
---
 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 c4da2df..30c53d3 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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-03 15:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08 15:15 [PATCH] base: dd: don't remove driver_data in -EPROBE_DEFER case Yi Zhang
     [not found] ` <1457450122-5792-1-git-send-email-yizhang_hust-9Onoh4P/yGk@public.gmane.org>
2016-05-03 13:11   ` Thierry Reding
2016-05-03 13:11     ` Thierry Reding
     [not found]     ` <20160503131126.GA18494-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-05-03 15:07       ` Greg KH
2016-05-03 15:07         ` Greg KH
2016-05-03 15:14         ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.