From 3f33091e6bac68a91f47ef62dc4c7838d559317f Mon Sep 17 00:00:00 2001 From: Chia-hung Duan Date: Wed, 3 Jul 2019 14:43:57 +0800 Subject: [PATCH] build: Resolve array index out-of-bound warning [1/1] PD#SWPL-8241 Problem: ** SYNC FROM GOOGLE ** Build failed due to uninitialzed variable Solution: Add assertion as guard Verify: Build with Android prebuilt toolchain Change-Id: Iaf84c857e23c9552bc44f4924bda0510c39e0a32 --- .../gpu/arm/midgard/backend/gpu/mali_kbase_mmu_hw_direct.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dvalin/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_mmu_hw_direct.c b/dvalin/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_mmu_hw_direct.c index ba5bf72..120de4d 100755 --- a/dvalin/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_mmu_hw_direct.c +++ b/dvalin/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_mmu_hw_direct.c @@ -157,6 +157,7 @@ void kbase_mmu_interrupt(struct kbase_device *kbdev, u32 irq_stat) * for not-found here */ as_no = ffs(bf_bits | pf_bits) - 1; + KBASE_DEBUG_ASSERT(as_no >= 0); as = &kbdev->as[as_no]; /* find the fault type */ -- 2.20.1