From 34e88644e83d209ef0d194a6d06efeb6c9bd4a09 Mon Sep 17 00:00:00 2001 From: Chia-hung Duan Date: Wed, 3 Jul 2019 14:40:41 +0800 Subject: [PATCH] build: fix uninitialized-use when build with prebuilt toolchain [1/1] PD#SWPL-8241 Problem: ** SYNC FROM GOOGLE ** Build failed due to uninitialzed variable Solution: Init to reasonable value Verify: Build with Android prebuilt toolchain Change-Id: I09615276b48b6253f8084743a7d50081cfc24ec4 Signed-off-by: Shuide Chen --- drivers/amlogic/memory_ext/vmap_stack.c | 2 +- drivers/tee/optee/call.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/memory_ext/vmap_stack.c b/drivers/amlogic/memory_ext/vmap_stack.c index dae386a..4d567ae 100644 --- a/drivers/amlogic/memory_ext/vmap_stack.c +++ b/drivers/amlogic/memory_ext/vmap_stack.c @@ -445,7 +445,7 @@ static void check_sp_fault_again(struct pt_regs *regs) { unsigned long sp = 0, addr; struct page *page; - int cache; + int cache = 0; #ifdef CONFIG_ARM sp = regs->ARM_sp; diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c index a5afbe6..8823771 100644 --- a/drivers/tee/optee/call.c +++ b/drivers/tee/optee/call.c @@ -365,7 +365,7 @@ int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session) { struct optee_context_data *ctxdata = ctx->data; struct tee_shm *shm; - struct optee_msg_arg *msg_arg; + struct optee_msg_arg *msg_arg = NULL; phys_addr_t msg_parg; struct optee_session *sess; -- 2.7.4