Commit 3b79b261 authored by Michael Ellerman's avatar Michael Ellerman

powerpc/sstep: Avoid used uninitialized error

Older compilers think val may be used uninitialized:

  arch/powerpc/lib/sstep.c: In function 'emulate_loadstore':
  arch/powerpc/lib/sstep.c:2758:23: error: 'val' may be used uninitialized in this function

We know better, but initialise val to 0 to avoid breaking the build.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent fdbb9457
...@@ -2727,6 +2727,7 @@ int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op) ...@@ -2727,6 +2727,7 @@ int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op)
if (!address_ok(regs, ea, size)) if (!address_ok(regs, ea, size))
return -EFAULT; return -EFAULT;
err = 0; err = 0;
val = 0;
switch (size) { switch (size) {
#ifdef __powerpc64__ #ifdef __powerpc64__
case 1: case 1:
......
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