summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuo Liu <shuo.liu@intel.com>2024-05-08 05:01:03 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-05-08 14:55:24 +0000
commite25c6ac11d27e6fa9064fbaf57c833ab61371f9e (patch)
tree016664c55e84ae85877c9e358bb6a85eb06e2cc1
parentf5105313cf6933d283ce6e66429f5d1001cd66ff (diff)
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 <shuo.liu@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82210 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
-rw-r--r--src/soc/intel/xeon_sp/spr/cpu.c2
1 files changed, 1 insertions, 1 deletions
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);
}