[PATCH] x86/platform/olpc: Remove redundant memset in prom_early_alloc()

From: Sang-Heon Jeon

Date: Thu Aug 27 2026 - 10:55:48 EST


memblock_alloc_or_panic() returns zeroed memory, so the memset after
the allocation is redundant.

No functional change.

Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>
---
arch/x86/platform/olpc/olpc_dt.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c
index e108ce7dad6a..b98f1fe70ce9 100644
--- a/arch/x86/platform/olpc/olpc_dt.c
+++ b/arch/x86/platform/olpc/olpc_dt.c
@@ -138,7 +138,6 @@ void * __init prom_early_alloc(unsigned long size)
*/
res = memblock_alloc_or_panic(chunk_size, SMP_CACHE_BYTES);
prom_early_allocated += chunk_size;
- memset(res, 0, chunk_size);
free_mem = chunk_size;
mem = res;
}
--
2.43.0