summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-07-21 09:17:58 -0600
committerMartin Roth <martinroth@google.com>2017-07-22 22:49:46 +0000
commit3f6421e1fa126b98688a2277f3034dec3b06c8d0 (patch)
tree73ea6142d2b0dc854b2536a86a6494e0195f0a73 /src/soc
parent4a1d450d07de5ac94ede8a61a1233e3ae675133d (diff)
downloadcoreboot-3f6421e1fa126b98688a2277f3034dec3b06c8d0.tar.xz
soc/intel/cannonlake: Keep variable from going out of scope
The variable p was going out of scope while still being pointed to by *cpu_name. Fix coverity ID 1378215 (Pointer to local outside scope) Change-Id: I6ad7b1919104b4d97869efe5065e39c2a43de638 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20682 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/cannonlake/bootblock/report_platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/cannonlake/bootblock/report_platform.c b/src/soc/intel/cannonlake/bootblock/report_platform.c
index c50814230d..7bc93e6622 100644
--- a/src/soc/intel/cannonlake/bootblock/report_platform.c
+++ b/src/soc/intel/cannonlake/bootblock/report_platform.c
@@ -68,13 +68,13 @@ static void report_cpu_info(void)
msr_t microcode_ver;
static const char * const mode[] = {"NOT ", ""};
const char *cpu_type = "Unknown";
+ u32 p[13];
index = 0x80000000;
cpuidr = cpuid(index);
if (cpuidr.eax < 0x80000004) {
strcpy(cpu_string, "Platform info not available");
} else {
- u32 p[13];
int j=0;
for (i = 2; i <= 4; i++) {