From 6ba83484e6d54ddce7c3caccb79d4e7015cfeb37 Mon Sep 17 00:00:00 2001 From: Krishna Prasad Bhat Date: Thu, 3 Aug 2023 12:15:32 +0530 Subject: 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 ad6d3128f87c ("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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76918 Tested-by: build bot (Jenkins) Reviewed-by: Sumeet R Pawnikar Reviewed-by: Sridhar Siricilla Reviewed-by: Elyes Haouas --- src/soc/intel/common/block/cse/cse_lite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel/common/block') diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index d3fcec7ba4..6203baaa45 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -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; } } -- cgit v1.2.3