From: Michael Neuling Date: Thu, 28 Aug 2008 04:57:39 +0000 (+1000) Subject: powerpc: Fix uninitialised variable in VSX alignment code X-Git-Tag: v2.6.27-rc6~46^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78fbc824ed8225edd80cdc57771d5ca4f7aae95e;p=linux-2.6 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 Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 367129789c..5af4e9b2db 100644 --- a/arch/powerpc/kernel/align.c +++ b/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 *) ¤t->thread.TS_FPR(reg); - int ret; + int ret = 0; flush_vsx_to_thread(current);