From 457c661f62b7614b6652e1ee1b67ad7596da4b17 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Wed, 21 Apr 2021 10:13:17 -0700 Subject: cpu/x86: Fix control flow UNREACHABLE issue Coverity detects the control flow UNREACHABLE issue for the printk usage. This change adds rc to keep the smm_module_setup_stub function call and returns rc after printk usage. Found-by: Coverity CID 1452602 TEST=None Signed-off-by: John Zhao Change-Id: Ie3b90a8197c3b84c5a1dbca8a9ef566bef35c9ab Reviewed-on: https://review.coreboot.org/c/coreboot/+/52574 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/cpu/x86/smm/smm_module_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/x86/smm') diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c index 1ac623e90c..e3b84179f4 100644 --- a/src/cpu/x86/smm/smm_module_loader.c +++ b/src/cpu/x86/smm/smm_module_loader.c @@ -458,9 +458,9 @@ int smm_setup_relocation_handler(void * const perm_smram, struct smm_loader_par if (params->num_concurrent_stacks == 0) params->num_concurrent_stacks = CONFIG_MAX_CPUS; + printk(BIOS_SPEW, "%s: exit\n", __func__); return smm_module_setup_stub(smram, SMM_DEFAULT_SIZE, params, fxsave_area_relocation, perm_smram); - printk(BIOS_SPEW, "%s: exit\n", __func__); } /* -- cgit v1.2.3