soc/intel/common: Return CB_ERR when cse_data_clear_request() fails

cse_prep_for_rw_update() should return CB_ERR when
cse_data_clear_request fails. It was modified to CB_SUCCESS in this
commit ad6d3128f8 ("soc/intel/common: Use enum cb_err values")

BRANCH=None
BUG=None
TEST=Verify the system goes to recovery during downgrade when
cse_data_clear_request() fails.

Change-Id: Ibbccb827765afa54e5ab1b386fa46093b803977a
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76918
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
Krishna Prasad Bhat 2023-08-03 12:15:32 +05:30 committed by Sridhar Siricilla
parent 5013c60a87
commit 6ba83484e6
1 changed files with 1 additions and 1 deletions

View File

@ -751,7 +751,7 @@ static enum cb_err cse_prep_for_rw_update(const struct cse_bp_info *cse_bp_info,
if ((status == CSE_UPDATE_DOWNGRADE) || (status == CSE_UPDATE_CORRUPTED)) {
if (cse_data_clear_request(cse_bp_info) != CB_SUCCESS) {
printk(BIOS_ERR, "cse_lite: CSE data clear failed!\n");
return CB_SUCCESS;
return CB_ERR;
}
}