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>
This commit is contained in:
Martin Roth 2017-07-21 09:17:58 -06:00
parent 4a1d450d07
commit 3f6421e1fa
1 changed files with 1 additions and 1 deletions

View File

@ -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++) {