From 82eb3dff10ae0c0436e0fcd5ff0c9cd2a2caab3c Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 20 Oct 2016 09:28:58 +0200 Subject: of_path: handle no driver for device in __of_find_path it can happen that there is a device, but there is no driver for this device because it hasn't been probed yet. Return -ENODEV in this case to let the caller know that it has to try later again. Signed-off-by: Sascha Hauer --- drivers/of/of_path.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/of/of_path.c') diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c index 8e1931f939..12a7c0257a 100644 --- a/drivers/of/of_path.c +++ b/drivers/of/of_path.c @@ -61,6 +61,9 @@ static int __of_find_path(struct device_node *node, const char *part, char **out return -ENODEV; } + if (!dev->driver) + return -ENODEV; + device_detect(dev); if (part) -- cgit v1.2.3