From 90abfd3fba8dbc8d5d350081fb63681b57ceafa4 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 12 Jan 2017 12:20:05 +0000 Subject: of_path: only handle no driver for device if it is on a bus This fixes a regression in __of_find_path() for flash devices created by the cadence-quadspi driver, which do not have 'dev->driver' set. Such devices do not have 'dev->bus' set either, so we can use that to qualify the existing test. Signed-off-by: Ian Abbott Signed-off-by: Sascha Hauer --- drivers/of/of_path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c index 946b9c7aa1..e0b2dc1247 100644 --- a/drivers/of/of_path.c +++ b/drivers/of/of_path.c @@ -66,7 +66,7 @@ static int __of_find_path(struct device_node *node, const char *part, char **out return -ENODEV; } - if (!dev->driver) + if (dev->bus && !dev->driver) return -ENODEV; device_detect(dev); -- cgit v1.2.3