diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-10-20 09:28:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-10-20 09:31:15 +0200 |
commit | 82eb3dff10ae0c0436e0fcd5ff0c9cd2a2caab3c (patch) | |
tree | 9db6cfab617927ccad2161fe1cbf0792b0acf3cf /drivers/of | |
parent | 70af08d8634c00e9593a4407b86a303246791cfb (diff) | |
download | barebox-82eb3dff10ae0c0436e0fcd5ff0c9cd2a2caab3c.tar.gz barebox-82eb3dff10ae0c0436e0fcd5ff0c9cd2a2caab3c.tar.xz |
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/of_path.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) |