aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/base.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 710b53bfac6d..632ebae7f17a 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -496,6 +496,9 @@ EXPORT_SYMBOL(of_find_node_with_property);
496const struct of_device_id *of_match_node(const struct of_device_id *matches, 496const struct of_device_id *of_match_node(const struct of_device_id *matches,
497 const struct device_node *node) 497 const struct device_node *node)
498{ 498{
499 if (!matches)
500 return NULL;
501
499 while (matches->name[0] || matches->type[0] || matches->compatible[0]) { 502 while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
500 int match = 1; 503 int match = 1;
501 if (matches->name[0]) 504 if (matches->name[0])