summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2022-10-24 15:13:46 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2022-11-24 23:31:49 +1100
commitf668027521561d1071ccf54500c82a58a1918b2b (patch)
tree874ec7387a93ef789925763b3dbd5aa8b6385b31 /arch/powerpc
parentad8284ead833379fc57d90e50dbae1352b116c2b (diff)
downloadlinux-stable-f668027521561d1071ccf54500c82a58a1918b2b.tar.gz
linux-stable-f668027521561d1071ccf54500c82a58a1918b2b.tar.bz2
linux-stable-f668027521561d1071ccf54500c82a58a1918b2b.zip
powerpc/8xx: Fix warning in hw_breakpoint_handler()
In hw_breakpoint_handler(), ea is set by wp_get_instr_detail() except for 8xx, leading the variable to be passed uninitialised to wp_check_constraints(). This is safe as wp_check_constraints() returns early without using ea, so just set it to make the compiler happy. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20221024041346.103608-1-ruscur@russell.cc
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/hw_breakpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c
index 8db1a15d7acb..e1b4e70c8fd0 100644
--- a/arch/powerpc/kernel/hw_breakpoint.c
+++ b/arch/powerpc/kernel/hw_breakpoint.c
@@ -646,7 +646,7 @@ int hw_breakpoint_handler(struct die_args *args)
ppc_inst_t instr = ppc_inst(0);
int type = 0;
int size = 0;
- unsigned long ea;
+ unsigned long ea = 0;
/* Disable breakpoints during exception handling */
hw_breakpoint_disable();