MIPS: smp-cps: Fix potentially uninitialised value of core
authorMatt Redfearn <matt.redfearn@imgtec.com>
Fri, 31 Mar 2017 10:51:08 +0000 (11:51 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 12 Apr 2017 19:34:30 +0000 (21:34 +0200)
commitbac06cf0fb9dfd79877a4eaa2ec7c09a6b853ffa
tree2250f21c79055b4ca6485c123727a923a970dfc6
parentec62a3bd84df90a19b7d59d032fa807bbfea7cbb
MIPS: smp-cps: Fix potentially uninitialised value of core

Turning on DEBUG in smp-cps.c, or compiling the kernel with
CONFIG_DYNAMIC_DEBUG enabled results the build error:

arch/mips/kernel/smp-cps.c: In function 'play_dead':
./include/linux/dynamic_debug.h:126:3: error: 'core' may be used
uninitialized in this function [-Werror=maybe-uninitialized]

Fix this by always initialising the variable.

Fixes: 0d2808f338c7 ("MIPS: smp-cps: Add support for CPU hotplug of MIPSr6 processors")
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15848/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/smp-cps.c