summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2017-09-01 23:48:17 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2017-09-02 00:04:26 +0200
commit3b79b26101936bbdb7a5c69161c69d65a1108fb0 (patch)
tree94a143fece324597a4e1cf5da1a3bafe994d417b /arch/powerpc
parentaxonram: Return directly after a failed kzalloc() in axon_ram_probe() (diff)
downloadlinux-3b79b26101936bbdb7a5c69161c69d65a1108fb0.tar.xz
linux-3b79b26101936bbdb7a5c69161c69d65a1108fb0.zip
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: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/lib/sstep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 06dd61d8d48b..fb9f58b868e7 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -2727,6 +2727,7 @@ int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op)
if (!address_ok(regs, ea, size))
return -EFAULT;
err = 0;
+ val = 0;
switch (size) {
#ifdef __powerpc64__
case 1: