Commit c816be7b authored by David S. Miller's avatar David S. Miller

sparc32: Fix might-be-used-uninitialized warning in do_sparc_fault().

When we try to handle vmalloc faults, we can take a code
path which uses "code" before we actually set it.

Amusingly gcc-3.3 notices this yet gcc-4.x does not.
Reported-by: default avatarBob Breuer <breuerr@mc.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 35043c42
...@@ -240,11 +240,10 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write, ...@@ -240,11 +240,10 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
* only copy the information from the master page table, * only copy the information from the master page table,
* nothing more. * nothing more.
*/ */
code = SEGV_MAPERR;
if (!ARCH_SUN4C && address >= TASK_SIZE) if (!ARCH_SUN4C && address >= TASK_SIZE)
goto vmalloc_fault; goto vmalloc_fault;
code = SEGV_MAPERR;
/* /*
* If we're in an interrupt or have no user * If we're in an interrupt or have no user
* context, we must not take the fault.. * context, we must not take the fault..
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment