[POWERPC] ] Fix memset size error
authorLi Zefan <lizf@cn.fujitsu.com>
Mon, 5 Nov 2007 02:21:56 +0000 (13:21 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 8 Nov 2007 03:15:33 +0000 (14:15 +1100)
The size passing to memset is wrong.

Signed-off-by Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/prom_init.c

index 1db10f70ae69bb0d4da938d068bb81fbd434f1b3..1add6efdb315065e4b424114944911ddb89a3c0e 100644 (file)
@@ -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) {