[PATCH 3/3] of_path: handle no driver for device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 drivers/of/of_path.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index 8e1931f..12a7c02 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)
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux