From 3f6421e1fa126b98688a2277f3034dec3b06c8d0 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Fri, 21 Jul 2017 09:17:58 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/20682 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Lijian Zhao --- src/soc/intel/cannonlake/bootblock/report_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc') 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++) { -- cgit v1.2.3