diff options
| author | Taticharla Venkata Sai <venkatasai.taticharla@amd.com> | 2025-08-12 14:57:02 +0530 |
|---|---|---|
| committer | Venkata Sai Taticharla <venkatasai.taticharla@amd.com> | 2026-01-08 16:31:27 +0000 |
| commit | ada9e227e90f78dfe36ffe924faba3747a988745 (patch) | |
| tree | 3e0d9521a81aeffc318ee39b8c078595ef5768ef | |
| parent | 6c61ed4d97782060d08539fcad28845dcd46cb0c (diff) | |
| download | arm-trusted-firmware-ada9e227e90f78dfe36ffe924faba3747a988745.tar.gz arm-trusted-firmware-ada9e227e90f78dfe36ffe924faba3747a988745.zip | |
fix(optee): initialize the structure
This corrects the MISRA violation C2012-9.1:
Initialize the structure with memset to ensures the structure
contains predictable zero values before being passed to functions,
preventing potential undefined behavior from uninitialized
automatic storage.
Change-Id: Ib89b45b8aeefa211afacc77f948a5888815f9e68
Signed-off-by: Taticharla Venkata Sai <venkatasai.taticharla@amd.com>
| -rw-r--r-- | services/spd/opteed/opteed_pm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/spd/opteed/opteed_pm.c b/services/spd/opteed/opteed_pm.c index c4a79f58a..a3eac2650 100644 --- a/services/spd/opteed/opteed_pm.c +++ b/services/spd/opteed/opteed_pm.c @@ -105,7 +105,7 @@ void opteed_cpu_on_finish_handler(u_register_t unused) int32_t rc = 0; uint32_t linear_id = plat_my_core_pos(); optee_context_t *optee_ctx = &opteed_sp_context[linear_id]; - entry_point_info_t optee_on_entrypoint; + entry_point_info_t optee_on_entrypoint = {}; assert(optee_vector_table); assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_OFF || |
