From d12f067d05392cc413f540c56f01e00ddc7993e8 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 55bffc4e1953..2a91eb6f0081 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 a5afbe6dee68..8823771566b8 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;