summaryrefslogtreecommitdiffstats
path: root/kernel/resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 0dd3a85..63e8793 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -261,8 +261,10 @@ int find_next_system_ram(struct resource *res)
if (!p)
return -1;
/* copy data */
- res->start = p->start;
- res->end = p->end;
+ if (res->start < p->start)
+ res->start = p->start;
+ if (res->end > p->end)
+ res->end = p->end;
return 0;
}
#endif
OpenPOWER on IntegriCloud