summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/intel/common/block/cse/cse_lite.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c
index edb08dacb2..7daa35eb9b 100644
--- a/src/soc/intel/common/block/cse/cse_lite.c
+++ b/src/soc/intel/common/block/cse/cse_lite.c
@@ -169,13 +169,14 @@ static void cse_trigger_recovery(uint8_t rec_sub_code)
/* Log CSE Firmware Status Registers to help debugging */
cse_log_status_registers();
if (CONFIG(VBOOT)) {
- struct vb2_context *ctx;
- ctx = vboot_get_context();
+ struct vb2_context *ctx = vboot_get_context();
+ if (ctx == NULL)
+ goto failure;
vb2api_fail(ctx, VB2_RECOVERY_INTEL_CSE_LITE_SKU, rec_sub_code);
vboot_save_data(ctx);
vboot_reboot();
}
-
+failure:
die("cse_lite: Failed to trigger recovery mode(recovery subcode:%d)\n", rec_sub_code);
}