From: Michael Neuling Date: Thu, 28 Aug 2008 04:57:39 +0000 (+1000) Subject: powerpc: Fix uninitialised variable in VSX alignment code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=78fbc824ed8225edd80cdc57771d5ca4f7aae95e;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 367129789cc0..5af4e9b2dbe2 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);