]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/of/device.c
of/device: Add OF style matching helper function
[mv-sheeva.git] / drivers / of / device.c
index c2a98f5ca80d94e8f5909933e743b7b54b5dc3de..5282a202f5a95533cca53e1ab0e227700979b6cd 100644 (file)
@@ -20,7 +20,7 @@
 const struct of_device_id *of_match_device(const struct of_device_id *matches,
                                           const struct device *dev)
 {
-       if (!dev->of_node)
+       if ((!matches) || (!dev->of_node))
                return NULL;
        return of_match_node(matches, dev->of_node);
 }