aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c
index c2a98f5ca80d..5282a202f5a9 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -20,7 +20,7 @@
20const struct of_device_id *of_match_device(const struct of_device_id *matches, 20const struct of_device_id *of_match_device(const struct of_device_id *matches,
21 const struct device *dev) 21 const struct device *dev)
22{ 22{
23 if (!dev->of_node) 23 if ((!matches) || (!dev->of_node))
24 return NULL; 24 return NULL;
25 return of_match_node(matches, dev->of_node); 25 return of_match_node(matches, dev->of_node);
26} 26}