aboutsummaryrefslogtreecommitdiff
path: root/lib/assoc_array.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-09-17 11:19:07 -0700
committerMark Brown <broonie@kernel.org>2014-09-17 11:19:07 -0700
commit72df321f602520b6ea09f47a71b6795efc0a83c8 (patch)
treee32e2d9dff3d90f49e95f0bfa61860eac0dc3ed3 /lib/assoc_array.c
parent1414ffefd32b80f827a697505a9eede86978ebbb (diff)
parent0111d0f13469831266d716e3b50d580a3e25cff9 (diff)
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-rtlsk-v3.14-rt-14.09
Diffstat (limited to 'lib/assoc_array.c')
-rw-r--r--lib/assoc_array.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/assoc_array.c b/lib/assoc_array.c
index c0b1007011e1..2404d03e251a 100644
--- a/lib/assoc_array.c
+++ b/lib/assoc_array.c
@@ -1723,11 +1723,13 @@ ascend_old_tree:
shortcut = assoc_array_ptr_to_shortcut(ptr);
slot = shortcut->parent_slot;
cursor = shortcut->back_pointer;
+ if (!cursor)
+ goto gc_complete;
} else {
slot = node->parent_slot;
cursor = ptr;
}
- BUG_ON(!ptr);
+ BUG_ON(!cursor);
node = assoc_array_ptr_to_node(cursor);
slot++;
goto continue_node;
@@ -1735,7 +1737,7 @@ ascend_old_tree:
gc_complete:
edit->set[0].to = new_root;
assoc_array_apply_edit(edit);
- edit->array->nr_leaves_on_tree = nr_leaves_on_tree;
+ array->nr_leaves_on_tree = nr_leaves_on_tree;
return 0;
enomem: