From 477b4c539a5c05a0ccdf11b68fdff78b2ebe56cb Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sun, 22 Feb 2015 16:21:01 +0100 Subject: AMD Fam10h: Don't write uninitialized data into ACPI The goto statement skipped all the code that is necessary to fill in the data structures that are read right after the jump. Since there doesn't seem to be useful data, why write these ACPI objects in the first place? Change-Id: I1d06c11a7a31517b81e54159355d5c27e3cc3735 Signed-off-by: Patrick Georgi Found-by: Coverity Scan Reviewed-on: http://review.coreboot.org/8507 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Timothy Pearson Reviewed-by: Alexandru Gagniuc --- src/cpu/amd/model_10xxx/powernow_acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/cpu/amd/model_10xxx/powernow_acpi.c b/src/cpu/amd/model_10xxx/powernow_acpi.c index 8b3ae37ba5..0b3681cbb1 100644 --- a/src/cpu/amd/model_10xxx/powernow_acpi.c +++ b/src/cpu/amd/model_10xxx/powernow_acpi.c @@ -145,7 +145,7 @@ static void pstates_algorithm(u32 pcontrol_blk, u8 plen, u8 onlyBSP) cpuid1 = cpuid(0x80000007); if ((cpuid1.edx & 0x80) != 0x80) { printk(BIOS_INFO, "No valid set of P-states\n"); - goto write_pstates; + return; } uint8_t pviModeFlag; @@ -258,7 +258,6 @@ static void pstates_algorithm(u32 pcontrol_blk, u8 plen, u8 onlyBSP) Pstate_latency[index]); } -write_pstates: for (index = 0; index < cmp_cap; index++) write_pstates_for_core(Pstate_num, Pstate_feq, Pstate_power, Pstate_latency, Pstate_control, Pstate_status, -- cgit v1.2.3