Sfoglia il codice sorgente

powerpc: Fix uninitialised variable in VSX alignment code

This fixes an uninitialised variable in the VSX alignment code.  It can
cause warnings from GCC (noticed with gcc-4.1.1).  Gcc is actually
correct in this instance, and this bug could cause the alignment
interrupt handler to send a SIGSEGV to the process on a legitimate
access.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Neuling 16 anni fa
parent
commit
78fbc824ed
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      arch/powerpc/kernel/align.c

+ 1 - 1
arch/powerpc/kernel/align.c

@@ -647,7 +647,7 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
 		       unsigned int flags, unsigned int length)
 {
 	char *ptr = (char *) &current->thread.TS_FPR(reg);
-	int ret;
+	int ret = 0;
 
 	flush_vsx_to_thread(current);