aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/fsp/fsp-dpo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/fsp/fsp-dpo.c b/hw/fsp/fsp-dpo.c
index 788c6c4..08d2ef2 100644
--- a/hw/fsp/fsp-dpo.c
+++ b/hw/fsp/fsp-dpo.c
@@ -43,13 +43,13 @@ unsigned long fsp_dpo_init_tb = 0;
*/
static int64_t fsp_opal_get_dpo_status(int64_t *dpo_timeout)
{
- int64_t timeout = 0;
-
- if (fsp_dpo_init_tb && fsp_dpo_pending)
- timeout = DPO_TIMEOUT - tb_to_secs(mftb() - fsp_dpo_init_tb);
-
- *dpo_timeout = timeout;
- return OPAL_SUCCESS;
+ if (fsp_dpo_init_tb && fsp_dpo_pending) {
+ *dpo_timeout = DPO_TIMEOUT - tb_to_secs(mftb() - fsp_dpo_init_tb);
+ return OPAL_SUCCESS;
+ } else {
+ *dpo_timeout = 0;
+ return OPAL_WRONG_STATE;
+ }
}
/* Process FSP DPO init message */