When a state change fails there's no need to restore the original
state as it remains the same.
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
/* Directly move from STARTED to SUSPENDED state */
if (!__sbi_hsm_hart_change_state(hdata, SBI_HSM_STATE_STARTED,
- SBI_HSM_STATE_SUSPENDED)) {
- ret = SBI_EDENIED;
- goto fail_restore_state;
- }
+ SBI_HSM_STATE_SUSPENDED))
+ return SBI_EDENIED;
/* Save the suspend type */
hdata->suspend_type = suspend_type;
jump_warmboot();
}
-fail_restore_state:
/*
* We might have successfully resumed from retentive suspend
* or suspend failed. In both cases, we restore state of hart.