diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/resource.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 0dd3a857579e..63e879379dbd 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -261,8 +261,10 @@ int find_next_system_ram(struct resource *res) | |||
261 | if (!p) | 261 | if (!p) |
262 | return -1; | 262 | return -1; |
263 | /* copy data */ | 263 | /* copy data */ |
264 | res->start = p->start; | 264 | if (res->start < p->start) |
265 | res->end = p->end; | 265 | res->start = p->start; |
266 | if (res->end > p->end) | ||
267 | res->end = p->end; | ||
266 | return 0; | 268 | return 0; |
267 | } | 269 | } |
268 | #endif | 270 | #endif |