summaryrefslogtreecommitdiff
path: root/drivers/of/base.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-24 09:30:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-24 09:30:20 -0700
commite264ac8cad5a3f2e717ac68eb300766eef61f568 (patch)
treef6230e79ef751783d9a723c826dd64efde7d53c0 /drivers/of/base.c
parent200460067d19db4aab7f1d9f5c95dd644d260337 (diff)
parent06fb01fd1dc624d891cbe039a88a44bc8a8a9ec1 (diff)
Merge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6: spi/pl022: Add loopback support for the SPI on 5500 spi/omap_mcspi: Fix broken last word xfer of/flattree: minor cleanups dt: eliminate OF_NO_DEEP_PROBE and test for NULL match table dt: protect against NULL matches passed to of_match_node() dt: Refactor of_platform_bus_probe()
Diffstat (limited to 'drivers/of/base.c')
-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);
const struct of_device_id *of_match_node(const struct of_device_id *matches,
const struct device_node *node)
{
+ if (!matches)
+ return NULL;
+
while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
int match = 1;
if (matches->name[0])