From: Li Zefan Date: Mon, 5 Nov 2007 02:21:56 +0000 (+1100) Subject: [POWERPC] ] Fix memset size error X-Git-Tag: v2.6.24-rc3~175^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aca71ef8827d11de243e30f170cfc126376803b4;p=linux-2.6 [POWERPC] ] Fix memset size error The size passing to memset is wrong. Signed-off-by Li Zefan Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 1db10f70ae..1add6efdb3 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -1244,7 +1244,7 @@ static void __init prom_initialize_tce_table(void) local_alloc_bottom = base; /* It seems OF doesn't null-terminate the path :-( */ - memset(path, 0, sizeof(path)); + memset(path, 0, PROM_SCRATCH_SIZE); /* Call OF to setup the TCE hardware */ if (call_prom("package-to-path", 3, 1, node, path, PROM_SCRATCH_SIZE-1) == PROM_ERROR) {