diff --git a/flashrom.c b/flashrom.c
index 95b73ed..f99cff9 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -835,15 +835,11 @@
 	struct single_layout *const fallback = &flash->fallback_layout;
 	fallback->base.entries		= &fallback->entry;
 	fallback->base.capacity		= 1;
-	fallback->base.num_entries	= 1;
-	fallback->entry.start		= 0;
-	fallback->entry.end		= flash->chip->total_size * 1024 - 1;
-	fallback->entry.included	= true;
-	fallback->entry.name		= strdup("complete flash");
-	if (!fallback->entry.name) {
-		msg_cerr("Failed to probe chip: %s\n", strerror(errno));
+	fallback->base.num_entries	= 0;
+	if (flashrom_layout_add_region(&fallback->base,
+			0, flash->chip->total_size * 1024 - 1, "complete flash") ||
+	    flashrom_layout_include_region(&fallback->base, "complete flash"))
 		return -1;
-	}
 
 	tmp = flashbuses_to_text(flash->chip->bustype);
 	msg_cinfo("%s %s flash chip \"%s\" (%d kB, %s) ", force ? "Assuming" : "Found",
diff --git a/ich_descriptors.c b/ich_descriptors.c
index d67ed31..585a8b0 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -1351,25 +1351,20 @@
 		return 1;
 
 	memset(layout, 0x00, sizeof(*layout));
+	layout->base.entries = layout->entries;
+	layout->base.capacity = ARRAY_SIZE(layout->entries);
+	layout->base.num_entries = 0;
 
-	ssize_t i, j;
+	ssize_t i;
 	const ssize_t nr = MIN(ich_number_of_regions(cs, &desc.content), (ssize_t)ARRAY_SIZE(regions));
-	for (i = 0, j = 0; i < nr; ++i) {
+	for (i = 0; i < nr; ++i) {
 		const chipoff_t base = ICH_FREG_BASE(desc.region.FLREGs[i]);
 		const chipoff_t limit = ICH_FREG_LIMIT(desc.region.FLREGs[i]);
 		if (limit <= base)
 			continue;
-		layout->entries[j].start = base;
-		layout->entries[j].end = limit;
-		layout->entries[j].included = false;
-		layout->entries[j].name = strdup(regions[i]);
-		if (!layout->entries[j].name)
+		if (flashrom_layout_add_region(&layout->base, base, limit, regions[i]))
 			return 2;
-		++j;
 	}
-	layout->base.entries = layout->entries;
-	layout->base.capacity = ARRAY_SIZE(layout->entries);
-	layout->base.num_entries = j;
 	return 0;
 }
 
diff --git a/layout.c b/layout.c
index 47db484..e2acd77 100644
--- a/layout.c
+++ b/layout.c
@@ -61,7 +61,6 @@
 	struct flashrom_layout *const layout = get_global_layout();
 	FILE *romlayout;
 	char tempstr[256], tempname[256];
-	unsigned int i;
 	int ret = 1;
 
 	romlayout = fopen(name, "r");
@@ -94,23 +93,10 @@
 			msg_gerr("Error parsing layout file. Offending string: \"%s\"\n", tempstr);
 			goto _close_ret;
 		}
-		layout->entries[layout->num_entries].start = strtol(tstr1, (char **)NULL, 16);
-		layout->entries[layout->num_entries].end = strtol(tstr2, (char **)NULL, 16);
-		layout->entries[layout->num_entries].included = false;
-		layout->entries[layout->num_entries].name = strdup(tempname);
-		if (!layout->entries[layout->num_entries].name) {
-			msg_gerr("Error adding layout entry: %s\n", strerror(errno));
+		if (flashrom_layout_add_region(layout,
+				strtol(tstr1, NULL, 16), strtol(tstr2, NULL, 16), tempname))
 			goto _close_ret;
-		}
-		layout->num_entries++;
 	}
-
-	for (i = 0; i < layout->num_entries; i++) {
-		msg_gdbg("romlayout %08x - %08x named %s\n",
-			     layout->entries[i].start,
-			     layout->entries[i].end, layout->entries[i].name);
-	}
-
 	ret = 0;
 
 _close_ret:
@@ -289,6 +275,42 @@
  */
 
 /**
+ * @brief Add another region to an existing layout.
+ *
+ * @param layout The existing layout.
+ * @param start  Start address of the region.
+ * @param end    End address (inclusive) of the region.
+ * @param name   Name of the region.
+ *
+ * @return 0 on success,
+ *         1 if out of memory,
+ *         2 if the layout is full already.
+ */
+int flashrom_layout_add_region(
+		struct flashrom_layout *const layout,
+		const size_t start, const size_t end, const char *const name)
+{
+	if (layout->num_entries >= layout->capacity) {
+		msg_gerr("Error adding layout entry: No space left\n");
+		return 2;
+	}
+
+	struct romentry *const entry = &layout->entries[layout->num_entries];
+	entry->start	= start;
+	entry->end	= end;
+	entry->included	= false;
+	entry->name	= strdup(name);
+	if (!entry->name) {
+		msg_gerr("Error adding layout entry: %s\n", strerror(errno));
+		return 1;
+	}
+
+	msg_gdbg("Added layout entry %08zx - %08zx named %s\n", start, end, name);
+	++layout->num_entries;
+	return 0;
+}
+
+/**
  * @brief Mark given region as included.
  *
  * @param layout The layout to alter.
diff --git a/libflashrom.c b/libflashrom.c
index b9c2d35..feba00a 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -382,6 +382,8 @@
 		struct flashctx *const flashctx, const struct fmap *const fmap)
 {
 	int i;
+	char name[FMAP_STRLEN + 1];
+	const struct fmap_area *area;
 	struct flashrom_layout *l = get_global_layout();
 
 	if (!fmap || !l)
@@ -392,21 +394,10 @@
 		return 1;
 	}
 
-	for (i = 0; i < fmap->nareas; i++) {
-		l->entries[l->num_entries].start = fmap->areas[i].offset;
-		l->entries[l->num_entries].end = fmap->areas[i].offset + fmap->areas[i].size - 1;
-		l->entries[l->num_entries].included = false;
-		l->entries[l->num_entries].name =
-			strndup((const char *)fmap->areas[i].name, FMAP_STRLEN);
-		if (!l->entries[l->num_entries].name) {
-			msg_gerr("Error adding layout entry: %s\n", strerror(errno));
+	for (i = 0, area = fmap->areas; i < fmap->nareas; i++, area++) {
+		snprintf(name, sizeof(name), "%s", area->name);
+		if (flashrom_layout_add_region(l, area->offset, area->offset + area->size - 1, name))
 			return 1;
-		}
-		msg_gdbg("fmap %08x - %08x named %s\n",
-			l->entries[l->num_entries].start,
-			l->entries[l->num_entries].end,
-			l->entries[l->num_entries].name);
-		l->num_entries++;
 	}
 
 	*layout = l;
diff --git a/libflashrom.h b/libflashrom.h
index 603dccf..1b8c753 100644
--- a/libflashrom.h
+++ b/libflashrom.h
@@ -71,6 +71,7 @@
 		struct flashrom_flashctx *, size_t offset, size_t length);
 int flashrom_layout_read_fmap_from_buffer(struct flashrom_layout **layout,
 		struct flashrom_flashctx *, const uint8_t *buf, size_t len);
+int flashrom_layout_add_region(struct flashrom_layout *, size_t start, size_t end, const char *name);
 int flashrom_layout_include_region(struct flashrom_layout *, const char *name);
 void flashrom_layout_release(struct flashrom_layout *);
 void flashrom_layout_set(struct flashrom_flashctx *, const struct flashrom_layout *);
