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>
This commit is contained in:
Shuo Liu 2024-05-08 05:01:03 +08:00 committed by Felix Held
parent f5105313cf
commit e25c6ac11d

View File

@ -271,6 +271,6 @@ void mp_init_cpus(struct bus *bus)
intel_microcode_load_unlocked(microcode_patch); intel_microcode_load_unlocked(microcode_patch);
enum cb_err ret = mp_init_with_smm(bus, &mp_ops); 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); printk(BIOS_ERR, "MP initialization failure %d.\n", ret);
} }