[RFC 1/5] x86/boot/e820: Fix memmap to parse with 1 argument

Fam Zheng posted 5 patches 1 week, 1 day ago
[RFC 1/5] x86/boot/e820: Fix memmap to parse with 1 argument
Posted by Fam Zheng 1 week, 1 day ago
From: Thom Hughes <thom.hughes@bytedance.com>

This is needed because in the simplest case, parker Application Kernel
only gets one user e820 entry from memmap.

Signed-off-by: Thom Hughes <thom.hughes@bytedance.com>
Signed-off-by: Fam Zheng <fam.zheng@bytedance.com>
---
 arch/x86/kernel/e820.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 84264205dae5..05dfb192d4b9 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -330,7 +330,7 @@ int __init e820__update_table(struct e820_table *table)
 
 	/* If there's only one memory region, don't bother: */
 	if (table->nr_entries < 2)
-		return -1;
+		return 0;
 
 	BUG_ON(table->nr_entries > max_nr_entries);
 
-- 
2.39.5