ARM: Fix another build warning in arch/arm/mm/alignment.c
authorArnd Bergmann <arnd@arndb.de>
Sun, 7 Oct 2012 20:35:18 +0000 (20:35 +0000)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 20 Feb 2015 20:11:08 +0000 (22:11 +0200)
One such warning was recently fixed in a761cebf "ARM: Fix build warning
in arch/arm/mm/alignment.c" but only for the thumb2 case, this fixes
the other half.

arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:327:15: error: 'offset.un' may be used uninitialized in this function
arch/arm/mm/alignment.c:748:21: note: 'offset.un' was declared here

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/alignment.c

index 8011bbc..80dba38 100644 (file)
@@ -855,8 +855,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
                if (thumb2_32b) {
                        offset.un = 0;
                        handler = do_alignment_t32_to_handler(&instr, regs, &offset);
                if (thumb2_32b) {
                        offset.un = 0;
                        handler = do_alignment_t32_to_handler(&instr, regs, &offset);
-               } else
+               } else {
+                       offset.un = 0;
                        handler = do_alignment_ldmstm;
                        handler = do_alignment_ldmstm;
+               }
                break;
 
        default:
                break;
 
        default: