From e25c6ac11d27e6fa9064fbaf57c833ab61371f9e Mon Sep 17 00:00:00 2001 From: Shuo Liu Date: Wed, 8 May 2024 05:01:03 +0800 Subject: soc/intel/xeon_sp/spr: Refine return value checks mp_init_with_smm returns cb_err type, where 0 means success and negative values represent error (see cb_err.h). However, failure checks in form of "ret < 0" is not straightforward. Use "ret != CB_SUCCESS" instead. Change-Id: I7e57f2da0361f3109051e9a35b1cce81d559b261 Signed-off-by: Shuo Liu Reviewed-on: https://review.coreboot.org/c/coreboot/+/82210 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Angel Pons Reviewed-by: Lean Sheng Tan --- src/soc/intel/xeon_sp/spr/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/xeon_sp/spr/cpu.c b/src/soc/intel/xeon_sp/spr/cpu.c index ffd30b8361..ad099ab70b 100644 --- a/src/soc/intel/xeon_sp/spr/cpu.c +++ b/src/soc/intel/xeon_sp/spr/cpu.c @@ -271,6 +271,6 @@ void mp_init_cpus(struct bus *bus) intel_microcode_load_unlocked(microcode_patch); enum cb_err ret = mp_init_with_smm(bus, &mp_ops); - if (ret < 0) + if (ret != CB_SUCCESS) printk(BIOS_ERR, "MP initialization failure %d.\n", ret); } -- cgit v1.2.3