summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDinesh Gehlot <digehlot@google.com>2023-05-08 05:15:53 +0000
committerFelix Held <felix-coreboot@felixheld.de>2023-05-11 16:50:35 +0000
commit8c53e6a053ac82a54c681b40fdd075aab3414e19 (patch)
treed0932bee9244d170b81273d7712e486ab5fecf06 /src
parentf3027b809c1cab1a336df57f44e640ef2f632a1c (diff)
soc/intel/cmn/blk.cse: Fix check condition in store_cse_rw_fw_version()
The return value of cse_get_bp_info() is an enum integer, where zero means success and non-zero means failure. The function store_cse_rw_fw_version() calls the function cse_get_bp_info() and validates the return value as a boolean causing prematurely returns of the parent API even if cse_get_bp_info() is successful. This patch corrects this logical error by returning only if cse_get_bp_info() fails. TEST=Build and boot google/nivviks and verify that the ISH version info command is only being sent during cold boot. Signed-off-by: Dinesh Gehlot <digehlot@google.com> Change-Id: Ice278e5ac69ff2f2c9f1936b76d71ae9deb6f855 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74998 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/common/block/cse/cse_lite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c
index 460910bf30..733f68bc38 100644
--- a/src/soc/intel/common/block/cse/cse_lite.c
+++ b/src/soc/intel/common/block/cse/cse_lite.c
@@ -1181,7 +1181,7 @@ static void store_cse_rw_fw_version(void)
return;
struct get_bp_info_rsp cse_bp_info;
- if (!cse_get_bp_info(&cse_bp_info)) {
+ if (cse_get_bp_info(&cse_bp_info) != CB_SUCCESS) {
printk(BIOS_ERR, "cse_lite: Failed to get CSE boot partition info\n");
return;
}