diff options
| author | Takashi Iwai <tiwai@suse.de> | 2014-12-03 09:38:03 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2014-12-03 09:38:58 +0100 |
| commit | 2e3d4de1bd80b2f205aab0ed0a25daef464ab91c (patch) | |
| tree | 7caa6a353f9ff9f5e196ed01bbbfce1c8c5ec8ae /drivers/of/selftest.c | |
| parent | 492a7ea0a6d3cc9c16ad5f8af832ed4278225b2e (diff) | |
| parent | 009d0431c3914de64666bec0d350e54fdd59df6a (diff) | |
Merge tag 'v3.18-rc7' into for-next
... for allowing more cleanups of hda_intel.c driver-caps where both
upstream and for-next contain the changes.
Diffstat (limited to 'drivers/of/selftest.c')
| -rw-r--r-- | drivers/of/selftest.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/of/selftest.c b/drivers/of/selftest.c index 11b873c54a77..e2d79afa9dc6 100644 --- a/drivers/of/selftest.c +++ b/drivers/of/selftest.c @@ -896,10 +896,14 @@ static void selftest_data_remove(void) return; } - while (last_node_index >= 0) { + while (last_node_index-- > 0) { if (nodes[last_node_index]) { np = of_find_node_by_path(nodes[last_node_index]->full_name); - if (strcmp(np->full_name, "/aliases") != 0) { + if (np == nodes[last_node_index]) { + if (of_aliases == np) { + of_node_put(of_aliases); + of_aliases = NULL; + } detach_node_and_children(np); } else { for_each_property_of_node(np, prop) { @@ -908,7 +912,6 @@ static void selftest_data_remove(void) } } } - last_node_index--; } } @@ -921,6 +924,8 @@ static int __init of_selftest(void) res = selftest_data_add(); if (res) return res; + if (!of_aliases) + of_aliases = of_find_node_by_path("/aliases"); np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a"); if (!np) { |
