summaryrefslogtreecommitdiff
path: root/kernel/bump.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/bump.c')
-rw-r--r--kernel/bump.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/bump.c b/kernel/bump.c
index fd4f25d..8b7bd53 100644
--- a/kernel/bump.c
+++ b/kernel/bump.c
@@ -1,5 +1,6 @@
#include <bump.h>
#include <common.h>
+#include <log.h>
static char eheap[EHEAP_SIZE] = {0};
static size_t eheap_off = 0;
@@ -7,8 +8,12 @@ static size_t eheap_off = 0;
struct mem_info *km_find_memory(struct dt_node *head) {
struct dt_node *child = head->children;
while (child) {
- return km_find_memory(child);
- child = child->next;
+ struct mem_info *location = km_find_memory(child);
+ if (location) {
+ return location;
+ } else {
+ child = child->next;
+ }
}
if (strlen(head->name) != 0) {