Using new-style return values for spci_yield.

Bug: 132395846
Change-Id: I6af4343c3f84e90e1fee608988585e9eaf2ee6d4
diff --git a/src/api.c b/src/api.c
index a605ac4..b803cf5 100644
--- a/src/api.c
+++ b/src/api.c
@@ -149,23 +149,20 @@
 /**
  * Returns to the primary vm to allow this cpu to be used for other tasks as the
  * vcpu does not have work to do at this moment. The current vcpu is marked as
- * ready to be scheduled again. This SPCI function always returns SPCI_SUCCESS.
+ * ready to be scheduled again.
  */
-int32_t api_spci_yield(struct vcpu *current, struct vcpu **next)
+void api_yield(struct vcpu *current, struct vcpu **next)
 {
-	struct hf_vcpu_run_return ret = {
+	struct hf_vcpu_run_return primary_ret = {
 		.code = HF_VCPU_RUN_YIELD,
 	};
 
 	if (current->vm->id == HF_PRIMARY_VM_ID) {
 		/* Noop on the primary as it makes the scheduling decisions. */
-		return SPCI_SUCCESS;
+		return;
 	}
 
-	*next = api_switch_to_primary(current, ret, VCPU_STATE_READY);
-
-	/* SPCI_YIELD always returns SPCI_SUCCESS. */
-	return SPCI_SUCCESS;
+	*next = api_switch_to_primary(current, primary_ret, VCPU_STATE_READY);
 }
 
 /**