SPM: API Implementation Correction

Correct API 'tfm_spm_partition_err_handler' parameters.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I0b4b4eaacb093117911e10c4fdcadc1e10be3cca
diff --git a/secure_fw/spm/cmsis_func/spm_func.c b/secure_fw/spm/cmsis_func/spm_func.c
index 17f0136..c1bd5c2 100644
--- a/secure_fw/spm/cmsis_func/spm_func.c
+++ b/secure_fw/spm/cmsis_func/spm_func.c
@@ -1208,14 +1208,11 @@
  * In case of an error in the error handling, a non-zero value have to be
  * returned.
  */
-static void tfm_spm_partition_err_handler(
-    const struct spm_partition_desc_t *partition,
-    int32_t err_code)
+static void tfm_spm_partition_err_handler(const uint32_t idx, int32_t errcode)
 {
-    (void)err_code;
+    (void)errcode;
 
-    tfm_spm_partition_set_state(partition->static_data->partition_id,
-                                SPM_PARTITION_STATE_CLOSED);
+    tfm_spm_partition_set_state(idx, SPM_PARTITION_STATE_CLOSED);
 }
 
 enum spm_err_t tfm_spm_partition_init(void)
@@ -1255,7 +1252,7 @@
             if (res == TFM_SUCCESS) {
                 tfm_spm_partition_set_state(idx, SPM_PARTITION_STATE_IDLE);
             } else {
-                tfm_spm_partition_err_handler(part, res);
+                tfm_spm_partition_err_handler(idx, res);
                 fail_cnt++;
             }
         }