feat(el3-spmc): Initialize nonsecure_ffa_version in all cases am: 71d7b056ba

Original change: https://android-review.googlesource.com/c/trusty/external/trusted-firmware-a/+/3512252

Change-Id: Ie5e60440149aa75a567ec53417ea9bcdf16c8dcf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/services/std_svc/spmd/spmd_main.c b/services/std_svc/spmd/spmd_main.c
index 69fdd2c..d8d7b02 100644
--- a/services/std_svc/spmd/spmd_main.c
+++ b/services/std_svc/spmd/spmd_main.c
@@ -968,6 +968,8 @@
 		    (!is_spmc_at_el3() && (ctx->state == SPMC_STATE_RESET))) {
 			ret = FFA_ERROR_NOT_SUPPORTED;
 		} else if (!secure_origin) {
+			nonsecure_ffa_version = input_version;
+
 			if (is_spmc_at_el3()) {
 				/*
 				 * Forward the call directly to the EL3 SPMC, if
@@ -982,8 +984,6 @@
 			gp_regs_t *gpregs = get_gpregs_ctx(&ctx->cpu_ctx);
 			uint64_t rc;
 
-			nonsecure_ffa_version = input_version;
-
 			if (spmc_attrs.major_version == 1 &&
 			    spmc_attrs.minor_version == 0) {
 				ret = MAKE_FFA_VERSION(spmc_attrs.major_version,