aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lmb.c')
-rw-r--r--lib/lmb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/lmb.c b/lib/lmb.c
index 6390d63a2a0e..e34a9e586c42 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -134,6 +134,12 @@ static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base,
134 unsigned long coalesced = 0; 134 unsigned long coalesced = 0;
135 long adjacent, i; 135 long adjacent, i;
136 136
137 if ((rgn->cnt == 1) && (rgn->region[0].size == 0)) {
138 rgn->region[0].base = base;
139 rgn->region[0].size = size;
140 return 0;
141 }
142
137 /* First try and coalesce this LMB with another. */ 143 /* First try and coalesce this LMB with another. */
138 for (i=0; i < rgn->cnt; i++) { 144 for (i=0; i < rgn->cnt; i++) {
139 unsigned long rgnbase = rgn->region[i].base; 145 unsigned long rgnbase = rgn->region[i].base;