diff options
Diffstat (limited to 'firmware/2lib/2api.c')
-rw-r--r-- | firmware/2lib/2api.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/firmware/2lib/2api.c b/firmware/2lib/2api.c index aa1d25da..593a12cf 100644 --- a/firmware/2lib/2api.c +++ b/firmware/2lib/2api.c @@ -59,6 +59,11 @@ vb2_error_t vb2api_fw_phase1(struct vb2_context *ctx) if (rv) vb2api_fail(ctx, VB2_RECOVERY_GBB_HEADER, rv); + /* Check for dev switch */ + rv = vb2_check_dev_switch(ctx); + if (rv) + vb2api_fail(ctx, VB2_RECOVERY_DEV_SWITCH, rv); + /* * Check for recovery. Note that this function returns void, since any * errors result in requesting recovery. That's also why we don't @@ -67,20 +72,6 @@ vb2_error_t vb2api_fw_phase1(struct vb2_context *ctx) */ vb2_check_recovery(ctx); - /* Check for dev switch */ - rv = vb2_check_dev_switch(ctx); - if (rv && !(ctx->flags & VB2_CONTEXT_RECOVERY_MODE)) { - /* - * Error in dev switch processing, and we weren't already - * headed for recovery mode. Reboot into recovery mode, since - * it's too late to handle those errors this boot, and we need - * to take a different path through the dev switch checking - * code in that case. - */ - vb2api_fail(ctx, VB2_RECOVERY_DEV_SWITCH, rv); - return rv; - } - /* * Check for possible reasons to ask the firmware to make display * available. VB2_CONTEXT_RECOVERY_MODE may have been set above by |